goessner / markdown-it-texmath

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

When there is a line of text before the math formula, the formula will not be rendered correctly. #49

Open ashlesss opened 9 months ago

ashlesss commented 9 months ago

I have following content:

123
\[
H = \Delta \begin{bmatrix}
0 & 1 \\
1 & 0
\end{bmatrix},
\]

And the current result will be:

123 [ H = \Delta \begin{bmatrix} 0 & 1 \ 1 & 0 \end{bmatrix}, ]

But the expected result should be: image

When I am trying to fix this, just modify the content like this:

123

\[
H = \Delta \begin{bmatrix}
0 & 1 \\
1 & 0
\end{bmatrix},
\]

And it will produce the correct result.