-
Notifications
You must be signed in to change notification settings - Fork 146
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Why is rendered output wrapped in a <span>? #30
Comments
Good question! It has to be rendered into something, and we can't render it into a fragment, so it was just an arbitrary choice. I would be fine with changing it to a div, but that could also cause problems if your content was intended to be inline, was the theory. Although with an mdx file, I'm not even sure if its possible to generate inline content, so maybe a div is the better choice? I'd welcome a PR either way! |
Yeah I think this will cause a constant bloated error message around Dug around a bit and it seems to need a div 🤷♂️ Can put up a PR for this if we want? |
Just saw there already is a PR 😅 |
I recommend that this |
Closed by #34 |
First of all, thanks for making
next-mdx-remote
; this makes my life so much easier!One thing I did notice is that
hydrate.js
wraps therenderedOutput
in aspan
element:Because the
renderedOutput
may include block-level elements – which are technically not allowed within inline elements likespan
– the resulting HTML will often be invalid. As far as I can tell this does not cause any actual issues, but it does make me wonder whether this is a bug or a feature. 😄The text was updated successfully, but these errors were encountered: