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
<p>The expression <math>x = y</math> is boring.</p>
(Preferably the former — keeping $$ — so that I can then pass the output to something like KaTeX.)
I get the same behaviour when using the API:
const{ State }=require("markup-it");constmarkdown=require("markup-it/lib/markdown");consthtml=require("markup-it/lib/html");consttext="The expression $$x = y$$ is boring.";constmdState=State.create(markdown);constdocument=mdState.deserializeToDocument(text);consthtmlState=State.create(html);// console prints "<p>The expression is boring.</p>"console.log(htmlState.serializeDocument(document));
I've tried following through the logic of the conversion, but I haven't found anything obvious. My only clue is that the math element is represented as a node with isVoid: true. It might be that void nodes aren't converted to HTML, but I haven't found the line that would drop such nodes.
The text was updated successfully, but these errors were encountered:
Given the contents of
foo.md
:When I run this command:
I get this output:
The math has been removed.
I expect to get this:
Or perhaps this:
(Preferably the former — keeping
$$
— so that I can then pass the output to something like KaTeX.)I get the same behaviour when using the API:
I've tried following through the logic of the conversion, but I haven't found anything obvious. My only clue is that the math element is represented as a node with
isVoid: true
. It might be that void nodes aren't converted to HTML, but I haven't found the line that would drop such nodes.The text was updated successfully, but these errors were encountered: