goessner / markdown-it-texmath

Support TeX math equations with your Markdown documents.
MIT License
156 stars 28 forks source link

$$x^2$$ drops the 2 #35

Closed edemaine closed 2 years ago

edemaine commented 2 years ago

I'm guessing this is from the new regexes: in dollars mode, $$x^2$$ omits the 2 when calling KaTeX, so doesn't render.

It looks like /\${2}([^]*?)[^\\]\${2}/gy should be /\${2}([^]*?[^\\])\${2}/gy.

Maybe worth double-checking the other regexes.

goessner commented 2 years ago

good catch ... copy/paste to wrong position ... fixed with version 0.9.6

other regexes checked.

thanks

edemaine commented 2 years ago

Thanks! It works great now.