Skip to content

How to pass custom void elements to rehype-parse? #74

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

You must be logged in to vote

No, there’s no such option. It’s not valid HTML if the non-voids are not closed. rehype-parse is an HTML parser.
I recommend using correct HTML, and thus closing your custom elements, so that both browsers and rehype can handle them.

P.S. your input shows blueButton and the like, which are also not valid custom HTML elements (they’d need to include a - to become one)

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@wooorm
Comment options

@AshtarCodes
Comment options

@wooorm
Comment options

@AshtarCodes
Comment options

Answer selected by AshtarCodes
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