-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
🐛 BUG: React children surrounded by empty <p>
tags
#3319
Comments
<p>
tags
Sorry for the frustration! This is definitely an issue with our Markdown rendering, likely coming from the default either If possible, we should be removing empty |
* feat: use internal MDX tooling for markdown + components * fix: improve MD + component tests * chore: add changeset * fix: make tsc happy * fix(#3319): add regression test for component children * fix(markdown): support HTML comments in markdown * fix(#2474): ensure namespaced components are properly handled in markdown pages * fix(#3220): ensure html in markdown pages does not have extra surrounding space * fix(#3264): ensure that remark files pass in file information * fix(#3254): enable experimentalStaticExtraction for `.md` pages * fix: revert parsing change * fix: remove `markdown.mode` option
* feat: use internal MDX tooling for markdown + components * fix: improve MD + component tests * chore: add changeset * fix: make tsc happy * fix(withastro#3319): add regression test for component children * fix(markdown): support HTML comments in markdown * fix(withastro#2474): ensure namespaced components are properly handled in markdown pages * fix(withastro#3220): ensure html in markdown pages does not have extra surrounding space * fix(withastro#3264): ensure that remark files pass in file information * fix(withastro#3254): enable experimentalStaticExtraction for `.md` pages * fix: revert parsing change * fix: remove `markdown.mode` option
I have recently run into the same (or at least very similar) issue using an .mdx file from a content folder. When the element tags are on their own line, they cause empty p tags to render Code:
What renders
|
Same issue here... so many empty paragraph elements |
What version of
astro
are you using?1.0.0-beta.27
Are you using an SSR adapter? If so, which one?
None
What package manager are you using?
npm
What operating system are you using?
Mac
Describe the Bug
I have the following, very simple React component:
I am using this component in the following way inside a
page.md
page:However, the actual children (which is the
<ul>
element) are not being rendered correctly inside the{children}
variable inside the React component. Instead, they are surrounded with empty<p></p>
tags instead of being INSIDE the<p></p>
tags. Here is the actual DOM output:Link to Minimal Reproducible Example
https://stackblitz.com/edit/github-b7imzh?file=src/pages/index.astro
Participation
The text was updated successfully, but these errors were encountered: