-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Weird new line inside a self closing JSX tag with no attributes #3234
Comments
This has been discussed before and it's intentionally printed this way because of a Facebook use of JSX in a translation pipeline (see #1581). In this case, the solution is to manually include a line break before Going to close this but please comment if this does not solve your issue. Thanks for the report! |
I don’t understand how this issue is the same as #1581? |
If we put |
Let's keep this open until we're sure they're the same issue. |
Yeah, I've also thought about this problem after I've wrote my original comment. Maybe the following output could be considered as a possible solution?
|
I think it is totally fine to exceed the print width here. While it is technically possible to break between |
Thank you for the fix, @duailibe ! |
Prettier 1.8.2
Playground link
Input:
Output:
Expected behavior:
Maybe put
<br />
on the second line as a whole?The text was updated successfully, but these errors were encountered: