You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It appears that many markdown parsers supporting LaTeX allow the opening and closing $ or $$ to be on different lines, but it doesn't appear to work in md4c.
To reproduce:
this works: $$ a + b $$ but this doesn't:
$$
a + b
$$
Expected rendering: here's an example from stackedit.io, source on the left, rendered on the right.
Actual result in md4c: the LaTeX on the first line results in the callbacks I would expect (having set MD_FLAG_LATEXMATHSPANS), but the other LaTeX doesn't. In particular, it looks like it sees the pair of dollars on line 2 as an opening and closing pair, and similarly for the pair on line 4.
The text was updated successfully, but these errors were encountered:
If anything is unclear, feel free to ask for more details. I tried to dig into md4c.c to prepare a patch, but I didn't quite see how to approach it. I expect it would need to change somewhere in the chain md_process_normal_block_contents -> md_analyze_inlines -> md_analyze_marks -> md_analyze_dollar.
It appears that many markdown parsers supporting LaTeX allow the opening and closing
$
or$$
to be on different lines, but it doesn't appear to work inmd4c
.To reproduce:
Expected rendering: here's an example from stackedit.io, source on the left, rendered on the right.
Actual result in
md4c
: the LaTeX on the first line results in the callbacks I would expect (having setMD_FLAG_LATEXMATHSPANS
), but the other LaTeX doesn't. In particular, it looks like it sees the pair of dollars on line 2 as an opening and closing pair, and similarly for the pair on line 4.The text was updated successfully, but these errors were encountered: