Parse HAST node as a custom preact component #201
-
Heyo, I've been working on a project to support some custom markdown syntax which will be rendered as a custom preact component. I've done the steps in remark and the remarkRehype stages, so now I have my markdown content wrapped in Though, now I need to tell rehype to parse those elements as a custom preact component Does anyone have experience with the plugin or this use case? I'd very much appreciate some pointers here. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Why do you need to parse HTML? |
Beta Was this translation helpful? Give feedback.
Astro is acting as the renderer in this example, rehype react can't do anything to help.
You may be able to pass a custom renderer on the Astro side
https://stackoverflow.com/questions/76414686/custom-components-in-markdown-mdx-on-astro