We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
In DiffUtils, there is the following regular expression:
public class DiffUtils { private static Pattern unifiedDiffChunkRe = Pattern .compile("^@@\\s+-(?:(\\d+)(?:,(\\d+))?)\\s+\\+(?:(\\d+)(?:,(\\d+))?)\\s+@@$");
This will fail if there is a section header after the final @@ which is permitted. See https://en.wikipedia.org/wiki/Diff
"@@ -l,s +l,s @@ optional section heading"
This can be trivially fixed by replacing the regular expression with:
"^@@\\s+-(?:(\\d+)(?:,(\\d+))?)\\s+\\+(?:(\\d+)(?:,(\\d+))?)\\s+@@.*$"
... which will ignore the optional section heading.
Thanks for your project.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
In DiffUtils, there is the following regular expression:
This will fail if there is a section header after the final @@ which is permitted. See https://en.wikipedia.org/wiki/Diff
This can be trivially fixed by replacing the regular expression with:
... which will ignore the optional section heading.
Thanks for your project.
The text was updated successfully, but these errors were encountered: