Skip to content

Configuration for using raw HTML in Markdown with Rollup, Solid-JS etc #120

Answered by wooorm
patreeceeo asked this question in Q&A
Discussion options

You must be logged in to vote

You are using MDX through the rollup loader.
If you use .mdx extensions, then those “tags” (<em>) are not HTML, but JSX. The content is MDX, not markdown.
If you use .md extensions, then those tags are HTML, not JSX. The content is markdown, not MDX.

If you are using .mdx, you should not use rehype-raw, and you should not need allowDangerousHtml. Then everything will work already. This seems the best solution to me: use the MDX format with MDX.

If you are using .md, it gets more complex. If that’s the case I can advise more.

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@patreeceeo
Comment options

@wooorm
Comment options

@patreeceeo
Comment options

Answer selected by patreeceeo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants