-
-
Notifications
You must be signed in to change notification settings - Fork 378
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
How can I use @shikijs/rehype with react-markdown #829
Comments
That's probably an issue with Async plugins in react-markdown: remarkjs/react-markdown#680 |
@HerbertHe Yesterday, I also got the same issue when using shiki with react-markdown. But it seems that no a solution yet on the react-markdown side. So, I referred to this article, and I think we only need a simple hook and don't necessarily need react-markdown, like below: Hook
|
@liuhq Thank you for the example, maybe I don't need to do that now🌚. I just need to render the markdown formatted content for AI Agent answers. It seems that I don't need to JUST highlight the code content, but to add more interactions🤣 |
Validations
Describe the bug
I tried to use @shikijs/rehype with react-markdown, but I got an error as followed:
Reproduction
follow the document with @shikijs/rehype
Contributes
The text was updated successfully, but these errors were encountered: