Merge pull request #15 from quidryan/strip-windows-newline

Remove ^M from fileroot
This commit is contained in:
Bruce Eckel 2016-08-02 08:06:49 -06:00 committed by GitHub
commit e971340315

View File

@ -22,7 +22,7 @@ class Tags {
block = file.text
hasMainMethod = block.contains('main(String[] args)')
def firstLine = block.substring(0, block.indexOf("\n"))
fileRoot = firstLine.split("/")[-1] - ".java"
fileRoot = (firstLine.split("/")[-1] - ".java").trim() // Remove \r if it exists
mainClass = fileRoot
javaCmd = extract('java')
if(javaCmd) {