Skip to content
New issue

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

Don't give up on parsing #123

Merged
merged 2 commits into from
Apr 15, 2020
Merged

Don't give up on parsing #123

merged 2 commits into from
Apr 15, 2020

Conversation

dandavison
Copy link
Owner

cc @m-lima @gibfahn fixes #121 #100

This is a change to the parsing logic: instead of requiring that we detect the source diff type (git vs unified diff) from the first line, we keep trying to detect the source until we succeed. This causes diffs to be highlighted even when there is unrecognized initial material. Two tests are added for this sort of behavior, but one test is sacrificed -- involving non-diff input that looks diff-like.

@dandavison
Copy link
Owner Author

Only if you have time, but any thoughts/opinions/sanity-checking etc here would be appreciated @m-lima!

@dandavison
Copy link
Owner Author

Merging this, comments still welcome at any time.

@dandavison dandavison merged commit 714f973 into master Apr 15, 2020
@dandavison dandavison deleted the 121-dont-give-up-on-parsing branch April 15, 2020 20:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Highlight diffs when there is unrecognised initial content
1 participant