In-text equations containing dollar signs won't render#1
Merged
Conversation
Author
| }) | ||
| it('can handle multiple dollors in formulas', function () { | ||
| md.render('if $a^{$2.00}$ then $b^{$3.00}$').should.eql('<p>if \\(a^{$2.00}\\) then \\(b^{$3.00}\\)</p>\n') | ||
| }) |
|
LGTM! Thx for following up w/the maintainer too. |
|
LGTM |
coryschires
reviewed
Apr 22, 2020
markdown-it-mathjax.js
Outdated
| for (var i = 0; i < state.src.length; i++) { | ||
| var marker = state.src[i] | ||
| var afterMarker = state.src[ i + 1 ] | ||
| if (marker === endMarker && !!/[^\d]/.test(afterMarker) && (i + 1) > startMathPos) { |
Member
There was a problem hiding this comment.
I'd assume the !! is not necessary since test already returns true / false?
Although, honestly, who cares. Just thought I'd mention it.
Author
There was a problem hiding this comment.
Oh right of course! I thought I needed to coerce it but you're right. It works with null and even undefined. Thanks I'll update.
Member
|
Love it! Recommendation: Maybe update your issue to mention that you have a fork which fixes this issue. That may make them more likely to merge your changes. That said, probably doesn't matter. I agree, this project looks dead. LGTM |
Member
|
I left a couple notes on spelling otherwise lgtm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When using inline math delimiters
$and you have dollars as content our markdown-it-mathjax plugin doesn't work like it should.I created an issue with the maintainer: classeur#10
Changes
Follow up
I'll spread this around to our other tooling.