microsoft / vscode-markdown-it-katex

Add Math to your Markdown with a KaTeX plugin for Markdown-it
Other
15 stars 16 forks source link

Latex markdown renderer parsing, fixes #147043 #2

Closed JerryWJi closed 2 years ago

JerryWJi commented 2 years ago

This PR fixes #147043.

The Latex markdown renderer now correctly parses the terminating $$ delimiter when there is text following it, by parsing for the delimiter in the whole string rather than only looking at the last two characters. For example, this block of markdown code now renders correctly.

THis is the standard deviation formula:
$$
\sqrt{\frac{1}{N-1} \sum_{i=1}^N (x_i - \overline{x})^2}
$$ {#eq-stddev}
mjbvz commented 2 years ago

Thanks!