Replies: 1 comment 1 reply
-
Hey @benrbray 👋 That is also how |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Overview
remark-cite
package with arehype-cite
plugin for generating HTMLremark-math
andrehype-katex
as a reference for how to accomplish thisremark-math
plugin passes themathHtml
extension to unifiedDetails
I know that
rehype-katex
works by looking formath-inline
andmath-display
elements in thehast
tree:https://github.com/remarkjs/remark-math/blob/dd3075a597d243671bf2bbb46400e3e0f3577078/packages/rehype-katex/lib/index.js#L47-L56
The
math-inline
andmath-display
classes are assigned by themathHtml
plugin exported bymicromark-extension-math
:https://github.com/micromark/micromark-extension-math/blob/6fd7df3338fee9a2490cd32bee54d71c0af48581/dev/lib/html.js#L33-L46
If we have a processor defined as follows:
The
hast
tree will contain amath-inline
node:However, the
remark-math
repository does not include any reference to themathHtml
plugin exported bymicromark-extension-math
.https://github.com/search?q=repo%3Aremarkjs%2Fremark-math%20mathHtml&type=code
(see github search results above -- but also dug through the code manually)
Questions
remark-math
know how to generate HTML for math nodes ifmathHtml
is never imported?Thank You!
Beta Was this translation helpful? Give feedback.
All reactions