Skip to content

fix: splitting jsx text correctly#5006

Merged
lydell merged 3 commits intoprettier:masterfrom
yuliaHope:fix-jsx-text
Sep 2, 2018
Merged

fix: splitting jsx text correctly#5006
lydell merged 3 commits intoprettier:masterfrom
yuliaHope:fix-jsx-text

Conversation

@yuliaHope
Copy link
Copy Markdown
Contributor

@yuliaHope yuliaHope commented Aug 22, 2018

Fixes: #4941

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory)
  • I’ve read the contributing guidelines.

after
{stuff}
after
{stuff}after{stuff}after
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why is there one line with only a single {stuff} in it? This is a weird edge case so it doesn’t matter much, but I’d like to understand how things work.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Because we have three jsx expressins one after another. The same here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We don't wrap text without space before/after jsx expression, but we wrap multiple jsx expressions, don't we?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Ah, now I get it. Makes sense! 👍

@lydell lydell merged commit 0c7c1bf into prettier:master Sep 2, 2018
@lydell
Copy link
Copy Markdown
Member

lydell commented Sep 2, 2018

Thank you very much for doing this and sorry for the delay!

@ikatyang ikatyang added this to the 1.15 milestone Oct 25, 2018
@lock lock bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Jan 23, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jan 23, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants