-
-
Notifications
You must be signed in to change notification settings - Fork 865
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
An error occurs with certain text when using remarkMath
and rehypeKatex
.
#853
Comments
remarkMath
and rehypeKatex
.
This looks like a KaTeX problem, why not raise it with KaTeX? Why raise it here? Do you think there is something to change here? |
@wooorm const file = await unified()
.use(remarkParse)
.use(remarkMath)
.use(remarkRehype)
.use(rehypeKatex)
.use(rehypeStringify)
.process(`$\\begin\\ca$`) |
Cannot reproduce: import {unified} from 'unified'
import remarkParse from 'remark-parse'
import remarkMath from 'remark-math'
import remarkRehype from 'remark-rehype'
import rehypeKatex from 'rehype-katex'
import rehypeStringify from 'rehype-stringify'
const file = await unified()
.use(remarkParse)
.use(remarkMath)
.use(remarkRehype)
.use(rehypeKatex)
.use(rehypeStringify)
.process(`$\\begin\\ca$`)
console.log(String(file))
As in: there’s definitely a KaTeX error, when using the latest dependencies otherwise. Now, |
@wooorm |
OK, if you believe that math input to be valid for KaTeX. I’ll also work on a fix in |
In
So could be that that is the root problem |
Initial checklist
Affected packages and versions
react-markdown:9.0.1
Link to runnable example
No response
Steps to reproduce
Expected behavior
It should render the markdown text correctly.
Actual behavior
�Following error occurs.
![image](https://private-user-images.githubusercontent.com/52884648/359058626-ca859393-d4a6-4225-b223-d921b7d8e6c7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjYxNTE5NDcsIm5iZiI6MTcyNjE1MTY0NywicGF0aCI6Ii81Mjg4NDY0OC8zNTkwNTg2MjYtY2E4NTkzOTMtZDRhNi00MjI1LWIyMjMtZDkyMWI3ZDhlNmM3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA5MTIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwOTEyVDE0MzQwN1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTE4MWFhZjBjNmJmYjMxNTg4MjAxZTI3MzY2ODE1ZDI4ODU3MGJiYWExMmJhNzhkZWQ4ZjJkNGEwNGVkOTU5MTcmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.1lVh0-MhZw-3Z4QZUEvN2R-7J24OuySSvyruO2l6j0g)
Runtime
Other (please specify in steps to reproduce)
Package manager
Other (please specify in steps to reproduce)
OS
macOS
Build and bundle tools
Vite
The text was updated successfully, but these errors were encountered: