-
-
Notifications
You must be signed in to change notification settings - Fork 4.7k
MDX parser cannot incorrectly parses React components used within markdown syntax in paragraphs #5781
Copy link
Copy link
Labels
lang:mdxIssues affecting the MDX extension to Markdown (not general Markdown issues)Issues affecting the MDX extension to Markdown (not general Markdown issues)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.priority:highCode is printed in a way that alters the AST, breaks syntax, or is a significant regression. Urgent!Code is printed in a way that alters the AST, breaks syntax, or is a significant regression. Urgent!status:has prIssues with an accompanying pull request. These issues will probably be fixed soon!Issues with an accompanying pull request. These issues will probably be fixed soon!
Milestone
Metadata
Metadata
Assignees
Labels
lang:mdxIssues affecting the MDX extension to Markdown (not general Markdown issues)Issues affecting the MDX extension to Markdown (not general Markdown issues)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.priority:highCode is printed in a way that alters the AST, breaks syntax, or is a significant regression. Urgent!Code is printed in a way that alters the AST, breaks syntax, or is a significant regression. Urgent!status:has prIssues with an accompanying pull request. These issues will probably be fixed soon!Issues with an accompanying pull request. These issues will probably be fixed soon!
This isn't a regression in
1.16.0. I was doing this before today's release.Prettier 1.16.0
Playground link
Input:
Output:
Rendered:
As you can see, when it adds a completely blank line before the component, it will cause the italics to break and format the markdown / MDX incorrectly.
Expected behavior:
The completely blank line should not be there and the paragraph should read correctly and unbroken.