-
Notifications
You must be signed in to change notification settings - Fork 728
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
Diff requires two newlines between diff-blocks to highlight properly #1676
Comments
I have the same issue and did some investigation. The diff lexer is correct, if strict. The diff lexer does not understand empty lines, i.e. lines that only contain I am using AsciiDoctor to render AsciiDoc with embedded diffs to HTML. |
I encountered this exact same issue using Rouge within Jekyll. It turns out my IDE was stripping trailing whitespace which caused the single space on those "empty" lines to be removed, thus triggering this issue. |
This issue has been automatically marked as stale because it has not had any activity for more than a year. It will be closed if no additional activity occurs within the next 14 days. |
@johannesstricker As part of #1854, the rule around empty lines has been relaxed, it no longer requires spaces. This issue can be marked as resolved. |
Name of the lexer
diff
Code sample
This is how the output looks:
![image](https://user-images.githubusercontent.com/12081471/107475060-cffff000-6b73-11eb-89a8-3bdf271db582.png)
As you can see, it doesn't highlight the first line of a new diff block. It only works when I add an additional newline in between.
Also, why is the
//
at the beginning of the file wrapped in a<span class="err">
🤔The text was updated successfully, but these errors were encountered: