Skip to content

Fixed latex highlighter escaping math mode #5306

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

Merged
merged 1 commit into from
Apr 28, 2025
Merged

Conversation

ericv8v9s
Copy link
Contributor

Previously, using any macro in math mode causes the whole thing to fail to be recognized as math because the macro would be captured by the "cs" region.
For example, this segment would be highlighted incorrectly with $x \in A$ not highlighted as math and the word Finally after it highlighted as math.

First $A$ ...
Then $x \in A$ ...
Finally $B$ ...

screenshot_2025-04-09T03:31:24

Previously, using any macro in math mode (e.g. `$x \in X$`)
causes the whole thing to fail to be recognized as math
because the macro (`\in`) would be captured by the "cs" region.
@ericv8v9s
Copy link
Contributor Author

This does mean macros previously highlighted by cs region no longer get their highlights in math but that's something I can live with...

@mawww mawww merged commit 76de76e into mawww:master Apr 28, 2025
0 of 6 checks passed
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.

2 participants