cmarkgfm
cmarkgfm copied to clipboard
Backslash removed when rendering multiline latex formula
Hi,
consider this markdown example
# Some equations
$$
\begin{array}{c|c}
\tau & Q \\
\hline
& w^\top
\end{array}
$$
then converting it like this :
html = cmarkgfm.github_flavored_markdown_to_html(readme, cmarkgfmOptions.CMARK_OPT_UNSAFE)
it removes one of the two backslashes used to indicate new line in the latex formula :
<h1>Some equations</h1>
<p>$$
\begin{array}{c|c}
\tau & Q \
\hline
& w^\top
\end{array}
$$</p>
which produces a Matjax error when rendering the equation using those scripts :
<script>
MathJax = {
tex: {
inlineMath: [['$', '$'], ['\\(', '\\)']]
},
};
</script>
<script async
src="https://cdn.jsdelivr.net/npm/[email protected]/es5/tex-svg.js"
integrity="sha256-1CldwzdEg2k1wTmf7s5RWVd7NMXI/7nxxjJM2C4DqII="
crossorigin="anonymous"
></script>
Is there any way to avoid that ?