jsdiff
jsdiff copied to clipboard
Two regexes in parsePatch disagree about when a line with prefix `diff ` is a patch header
Namely, this regex...
/^(Index:\s|diff\s|---\s|\+\+\+\s|===================================================================)/
... and this regex:
/^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/
In the former, diff bla matches; in the latter, it does not. This surely has some buggy or at least weird-and-arbitrary consequences.