Skip to content
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

Unable to parse p tag with newline #2181

Closed
4 tasks done
cameronbraid opened this issue Nov 24, 2022 · 2 comments
Closed
4 tasks done

Unable to parse p tag with newline #2181

cameronbraid opened this issue Nov 24, 2022 · 2 comments
Labels

Comments

@cameronbraid
Copy link

cameronbraid commented Nov 24, 2022

Initial checklist

Affected packages and versions

latest

Link to runnable example

No response

Steps to reproduce

Examples to paste into playground

<p>a
</p>
<p>
a</p>

Expected behavior

Should parse fine

Actual behavior

example.mdx
1:1-1:5 error Expected a closing tag for <p> (1:1-1:4) before the end of paragraph end-tag-mismatch mdast-util-mdx-jsx

✖ 1 error

Runtime

Other (please specify in steps to reproduce)

Package manager

Other (please specify in steps to reproduce)

OS

Other (please specify in steps to reproduce)

Build and bundle tools

Other (please specify in steps to reproduce)

@ChristianMurphy
Copy link
Member

Duplicate of #2172

Again:

Please see the guide on MDX syntax https://mdxjs.com/docs/what-is-mdx/#jsx
A JSX block can either be inline or block, in your example line 1 is inline, the error is correct for inline content, there is no closing tag on line 1.
You want it to be a block, to do so use:

<p>
a
</p>

@ChristianMurphy ChristianMurphy closed this as not planned Won't fix, can't repro, duplicate, stale Nov 24, 2022
@cameronbraid
Copy link
Author

Aah, sorry, I was upgrading from an older version of mdx which worked for this example

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants