Skip to content

Two regexes in parsePatch disagree about when a line with prefix diff is a patch header #648

Description

@ExplodingCabbage

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions