-
Notifications
You must be signed in to change notification settings - Fork 163
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
Backslash escapes inside math and code are fontified as Markdown markup #766
Comments
This ensures that when using `markdown-hide-markup`, escape sequences are properly unescaped.
I think this would just need to add an extra check to not fontify backslash escapes when fontification has already added one of the following faces to the backslash:
That should be pretty straightforward with some new Maybe there's a cleaner way to do that though? |
Yes, that is how I would approach this. Another point to consider is, it should fontify only backslashes not preceding by another backslashes, i.e., in |
This part should already work. The regexp is (approximately) |
@saf-dmitry Ok, hopefully my PR fixes this. Can you try it out to see? |
I just played with it a little bit and it looks good. The
And maybe these faces too:
|
Link titles look like they support escape sequences, so I think they should be excluded from |
Previously, if hiding markup and using native fontification of code blocks, backslash escapes could get hidden inside code. See jrblevin#766.
@saf-dmitry Thanks for noticing, here's a fix: #836 |
Thank you for the prompt fix. It works. |
Backslashes inside math and code are fontified as Markdown markup.
Expected Behavior
Backslashes as part of math or code are fontified according to the type of content (i.e., LaTeX or corresponding code language).
Actual Behavior
Backslashes inside math or code are fontified and propertized as Markdown markup:
This is especially misleading when hiding Markdown syntax is enabled.
Steps to Reproduce
See the examples above.
Backtrace
Software Versions
Note
Commit ae1085a
The text was updated successfully, but these errors were encountered: