Skip to content

Commit

Permalink
Use $ regex character instead of check is ends with file extension.
Browse files Browse the repository at this point in the history
- Thanks to @ataylor284
  • Loading branch information
JSpiner authored and smith.jspiner committed Oct 17, 2021
1 parent 790d4f6 commit 9eb5223
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,6 @@ private static boolean fileContentEquals(File file, String code) throws IOExcept
}

private static String getDebugFileName( String file ) {
int extensionIndex = file.lastIndexOf( ".js" );

if ( extensionIndex != -1 && file.endsWith(".js") ) {
return file.substring(0, extensionIndex) + "-debug.js";
}
return file;
return file.replaceFirst( ".js$" , "-debug.js" );
}
}

0 comments on commit 9eb5223

Please sign in to comment.