Skip to content

Commit 49722a1

Browse files
committed
Make "/" after "virtual" directories mandatory
Now the regex only matches with "a/", "b/", "new/" and "old/", previously the slash was taken as optional. fixes #141
1 parent d17877f commit 49722a1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

java-diff-utils/src/main/java/com/github/difflib/unifieddiff/UnifiedDiffReader.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ private String extractFileName(String _line) {
353353
line = line.substring(0, matcher.start());
354354
}
355355
line = line.split("\t")[0];
356-
return line.substring(4).replaceFirst("^(a|b|old|new)(\\/)?", "")
356+
return line.substring(4).replaceFirst("^(a|b|old|new)/", "")
357357
.trim();
358358
}
359359

0 commit comments

Comments
 (0)