Skip to content

Can rehypeRemark passthrough all non standard html tags? #125

Discussion options

You must be logged in to vote

Welcome @giorgio-zamparelli! 👋

Some expectation setting before diving into things.
Your example, does not contain custom HTML tags.
Custom elements must have a dash in their name (see https://developer.mozilla.org/en-US/docs/Web/Web_Components/Using_custom_elements and https://html.spec.whatwg.org/#valid-custom-element-name)
<note> is not a built in tag or a custom element, it is invalid HTML.

Most likely you're trying to leverage another language like: JSX, Angular templates, Glimmer templates, etc.
If you need your content to be valid in a specific templating language, use a parser designed for that language.
HTML parsers will go into a recovery mode to try to handle this, which will re…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by ChristianMurphy
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