Simple example returns unexpected <head> tag #130
Answered
by
wooorm
guillaumegarcia13
asked this question in
Q&A
-
I can't get what I'm doing wrong here with this HTML snippet converted to AST then back to HTML
In my terminal, I get: it seems that empty made it (unexpectedly, at least to me) to the output. Is this because of the options used with the compiler? |
Beta Was this translation helpful? Give feedback.
Answered by
wooorm
Mar 6, 2021
Replies: 1 comment
-
You're missing the fragment option: https://github.com/rehypejs/rehype/tree/main/packages/rehype-parse#optionsfragment rehype-parse expects a whole document by default. |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
guillaumegarcia13
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You're missing the fragment option: https://github.com/rehypejs/rehype/tree/main/packages/rehype-parse#optionsfragment
rehype-parse expects a whole document by default.