Skip to content

Unable to use remark-math with rehype-remark? #241

Discussion options

You must be logged in to vote

If you want math to be left alone, you may want to hook in even sooner, like the unifiedLatexToHast to prevent it from being converted to HTML.

Ideally, I'd like remark-stringify to ignore all the maths, leaving it verbatim.

It sounds like you are ending up with a text node, which is correctly escaping special characters.
You probably want to make it an inlineMath MDAST node and include remark-math, which also includes a serializer to take math and inlineMath MDAST nodes back to markdown (with Latex appropriate escapes only).

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@dmca-glasgow
Comment options

@ChristianMurphy
Comment options

Answer selected by dmca-glasgow
@dmca-glasgow
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants