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

use non-greedy *? for display math content #6

Closed
wants to merge 1 commit into from
Closed

use non-greedy *? for display math content #6

wants to merge 1 commit into from

Conversation

kleinschmidt
Copy link
Contributor

Using greedy * means that the regex will match across display math blocks. For example, the current regex matches this whole snippet (including the non-math bit in the middle):

\[
some math
\]
non-math
\[
more math
\]

The only potential downside I can see is that if, for some strange reason, someone wants a literal \] inside their display math block, the regex will think that the block ends early. But this seems less likely than the frustrating situation of having non-math font-locked as math in between two display math blocks (which is very common in my documents).

@kleinschmidt
Copy link
Contributor Author

I've opened this at jrblevin/markdown-mode#168

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.

1 participant