mdx v2: New line inside DOM element (jsx) creates unnecessary paragraph
See original GitHub issueNew line inside DOM element (jsx) creates unnecessary paragraph
Steps to reproduce
in playground editor, input the following
<p>
Hello world
</p>
<div>
<span>
one
</span>
<span>
two
</span>
</div>
Expected compiled result
<p>
Hello world
</p>
<div>
<span>
one
</span>
<span>
two
</span>
</div>
Actual compiled result
<p>
<p>
Hello world
</p>
</p>
<div>
<span>
<p>
one
</p>
</span>
<span>
<p>
two
</p>
</span>
</div>
this ends up being invalid HTML
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:26 (14 by maintainers)
Top Results From Across the Web
Composing Documents with MDX: Markdown for the ...
In this tutorial, we'll create React UI components and MDX markdown components, to compose and style a markdown document.
Read more >MDX and React - Docusaurus
Docusaurus has built-in support for MDX v1, which allows you to write JSX within your Markdown files and render them as React components....
Read more >Adjacent JSX elements must be wrapped in an enclosing tag ...
The other people here are just telling you to use a parent element, but that may be unnecessary. This older version of your...
Read more >Untitled
Example of creating a button with a line break by using the tag: Oct 7, 2021 I'm using react-highlight-words library. Start using react-newline-to-break...
Read more >Hands-On way to build Frontend with React | Nick Ovchinnikov
I would like to open a completely new way to manage you. ... In D5W header image it just the elements inside react,...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This is expected behavior. It’s different from before, but I believe the new rules are in the end more sensical than the previous rules. See Interleaving and Migrating
I hear what you’re saying. Thanks for the discussion. I understand that the option I would be interested in will not be implemented, so you can close the issue.
Anyway, thanks for the great work!