Skip to content

Fix MDX double <p> tags#4267

Merged
Simek merged 1 commit into
react:mainfrom
slorber:slorber/fix-mdx-double-p
Oct 10, 2024
Merged

Fix MDX double <p> tags#4267
Simek merged 1 commit into
react:mainfrom
slorber:slorber/fix-mdx-double-p

Conversation

@slorber

@slorber slorber commented Oct 10, 2024

Copy link
Copy Markdown
Contributor

Docusaurus v3.6 (#4268) will have a new HTML minifier.

It has the ability to report some markup errors, such as <p> inside <p> which is not valid HTML.

We probably missed that during the MDX v2+ upgrade, but the usage of <p> + line breaks lead to duplicate paragraphs. The solution is to either use fragments or remove the line breaks.

See MDX playground:

CleanShot 2024-10-10 at 12 39 56

cc @Simek this shouldn't have any meaningful impact of the site but fixes the markup and will avoid printing another upcoming build warning.

@netlify

netlify Bot commented Oct 10, 2024

Copy link
Copy Markdown

Deploy Preview for react-native ready!

Name Link
🔨 Latest commit f5ced81
🔍 Latest deploy log https://app.netlify.com/sites/react-native/deploys/6707af417c6c9b000843eba7
😎 Deploy Preview https://deploy-preview-4267--react-native.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@Simek Simek left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested the changes on the preview, everything looks like expected, thanks for addressing that Sebastien! 👍

@Simek Simek merged commit bab5c58 into react:main Oct 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants