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
MDX: React Components with Blank Lines #1547
Comments
I am unable to reproduce this. I'll need more details like a full sample project with config, etc. |
Here's a repo: https://github.com/karlhorky/vscode-prettier-mdx-bug-reproduction I took all the configuration out and I am able to reproduce on both VS Code and VS Code Insider's Edition. This is with v5.7.1 of the extension (using the built-in version of Prettier). |
Ah yeah, this is a bug with prettier, not VS Code. I am able to get the same result through the command line |
Oh, sorry about that! I thought that there was special handling in Looks like there's already an open issue: prettier/prettier#9260 And a PR that should resolve it: prettier/prettier#9267 |
Can confirm that this is fixed in Prettier |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Summary
An extra blank line will be added after opening and closing tags of React components, if there are extra lines within the component.
This is a regression from a previous version.
Before
After
Github Repository to Reproduce Issue
https://gist.github.com/karlhorky/f0a4a1d9d7b4be84ab0e4f5739fda71e
Steps To Reproduce:
Expected result
No extra lines
Actual result
Extra lines after opening and closing tags
Additional information
Potentially related to: prettier/prettier#7041
Playground (with unexpected token issue mentioned in prettier/prettier#7041): Playground
VS Code Version: 1.48.2
Prettier Extension Version: 5.5.0
OS and version: macOS Catalina 10.15.6
Prettier Log Output
The text was updated successfully, but these errors were encountered: