Describe the bug
All latex macros that start with \n, such as \nabla or \neg are not parsed correctly when present in $$...$$ blocks. (They work correctly in single $...$ blocks, though). I'm using extras latex and breaks.
To Reproduce
-
Enable extras latex and "breaks": {"on_newline": True}
-
Try converting the following Markdown to HTML:
-
$\nabla$ --> Works! (Produces the ∇ character)
-
However, $$\nabla$$ does not work (Produces <mrow><mi>a</mi><mi>b</mi><mi>l</mi><mi>a</mi></mrow>)
The source of the error is probably that the \n part of \nabla gets interpreted as a literal line break instead of as part of the latex macro. As shown above, this happens only in latex "blocks" $$...$$ and not with inline latex $...$.
Expected behavior
See below how Github markdown renderer succeeds at parsing the operator:
$$\nabla$$
(Text above is literal $$\nabla$$)
Same with neg:
$$\neg$$
(Text above is literal $$\neg$$)
Debug info
Version of library being used: 2.5.4
Any extras being used: latex, breaks