-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rehype-mathjax: CHTML not rendering #85
Comments
Thanks for reaching out @FunkMonkey! 👋
While it is a good idea to use
Given that the SVG renderer works fine, but the CHTML one does not. And that the code between SVG: https://github.com/remarkjs/remark-math/blob/main/packages/rehype-mathjax/svg.js /cc @tani in case you have any additional ideas on what may be happening in the chtml |
Also cross linking a recent discussion in |
I think this has to do with React supporting properties ( Googling MathML + React gives many bugs, e.g., https://stackoverflow.com/questions/51319758/react-16-html-attributes-with-mathml-tags. MathML was mostly abandoned for years, but recently got updates and implementations. Hopefully React will add/improve MathML support. |
Welcome @edward1127! 👋
We don't have an update on the remark side, because remark isn't causing the issue. |
Thanks for the reply. I just reposted your summary vercel/next.js#54852 |
@edward1127 that link looks to be the question from #81? |
yep, you are right. |
This comment was marked as outdated.
This comment was marked as outdated.
I don‘t think that works. Whether it works or not it would break lots of things. If you really want to solve this issue, see the existing comments on this discussion and solve the root cause, or use a working alternative: do not use the CHTML rendered, or use rehype-katex. |
Whether this works or not has to do with react/preact/etc. Closing as this is/will be solved externally. Meanwhile, while custom elements do not work, you can always use a non-custom-element version of math. |
Initial checklist
Affected packages and versions
4.0.3
Link to runnable example
No response
Steps to reproduce
Runtime: Building via Vite for the browser on Node18.
Expected behavior
Equations should be rendered
Actual behavior
Equations are not rendered with
rehypeMathjaxChtml
, but are rendered when using the default SVG renderer instead.The problem is most likely that the generated HTML-code contains
classname
instead ofclass
, e.g.:I am not quite sure if this is a bug of rehype-mathjax or mathjax itself. Or does CHTML only work with
rehype-sanitize
, e.g. see README?Thanks!
Runtime
Other (please specify in steps to reproduce)
Package manager
yarn 2
OS
Windows
Build and bundle tools
Vite
The text was updated successfully, but these errors were encountered: