-
Notifications
You must be signed in to change notification settings - Fork 29
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
there is a rendering bug when using brackets #9
Comments
attach an example that reproduces the issue. I don't understand what you meant by the following regexp in your texmath.js
changing the above to
|
When using brackets, the current markdown-it-texmath can't render properly. This change fixes the incorrect regexp. fix goessner#9
Surprise ... after having added TeX macros to texmath I wanted to verify your issue.
The I suddenly saw, that you were also working on a solution for that issue at the same time. To your question first: Now bad news is: I even tried your suggested fix, but had no success with it. I added a bug test file Sorry & thanks |
There are 2 regexps to match equations contained in brackets, one is math_block_eqno, the other is math_block, the first regexp matches equations with an index at the end, aaaa (1) the second regexp matches equations without an index bbbb the program prioritize the first regexp over the second, but when multiple equations present with only some of them having an index. Javascript regexp will greedly match the longest string that fulfill the first regexp. For example bbbb aaaa (1) becomes one single equation, instead of 2. The fix adds a negative lookahead to exclude \\\[ \\\] patterns from a match. fix goessner#9
Verified your fix and implemented with version 0.5.5. Great work, thanks. |
the following markdown can't be rendered correctly:
but using the $ $$ syntax would work.
The text was updated successfully, but these errors were encountered: