-
Notifications
You must be signed in to change notification settings - Fork 748
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
Fix angle bracket being confused as diff #1854
Fix angle bracket being confused as diff #1854
Conversation
This fixes issue with highlighting content with angle bracket (<, >) in a diff. For example, `<span>` is no longer picked up as deleted, even when it is at the start of string.
👋🏼 @redonkulus could you kindly have a look at this PR and see if it helps to address the reported issue? 🙏 |
5ec1e34
to
595fd8a
Compare
This looks good to me! Thanks for the quick turnaround. |
@tancnle when do you think this will be released? |
@tancnle any word on a release for this? |
@redonkulus sorry for the late reply. I will try to cut a release sometime before the end of this week. |
@redonkulus FYI, I have cut a new release |
@tancnle Thank you for the release. Since you upgraded to 4.x, jekyll will not pull this fix in since they are on the 3.x major version branch. Was this a breaking change? Is it possible to port this to the 3.x branch so that Jekyll apps can get the fix too? |
@tancnle wonder if you are able to back port this to 3.x |
@tancnle You are correct, looks like version 4.3.x of jekyll was released with rouge 4.x. Thanks! |
Angle bracket
<
and>
at the start of the string is confused as inserted and deleted line by diff lexer.This change ensures we only pick up inserted line if there is some space between
>
and the next character, or immediately followed by a new line. The same rule also applies to the deleted line.Relates to #1850