Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8397e20

Browse files
fix: parsing unified diff chunk headers (#198)
The regex matching chunk headers does not account for diffs generated with --show-function-line
1 parent110a0da commit8397e20

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎java-diff-utils/src/main/java/com/github/difflib/UnifiedDiffUtils.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
publicfinalclassUnifiedDiffUtils {
3737

3838
privatestaticfinalPatternUNIFIED_DIFF_CHUNK_REGEXP =Pattern
39-
.compile("^@@\\s+-(?:(\\d+)(?:,(\\d+))?)\\s+\\+(?:(\\d+)(?:,(\\d+))?)\\s+@@$");
39+
.compile("^@@\\s+-(\\d+)(?:,(\\d+))?\\s+\\+(\\d+)(?:,(\\d+))?\\s+@@.*$");
4040
privatestaticfinalStringNULL_FILE_INDICATOR ="/dev/null";
4141

4242
/**

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp