Skip to content

Fixed unstable while comment#5251

Merged
j-f1 merged 3 commits intoprettier:masterfrom
jaideng123:while-unstable-fix
Oct 25, 2018
Merged

Fixed unstable while comment#5251
j-f1 merged 3 commits intoprettier:masterfrom
jaideng123:while-unstable-fix

Conversation

@jaideng123
Copy link
Copy Markdown
Contributor

@jaideng123 jaideng123 commented Oct 12, 2018

Fixed an Issues with unstable comments inside a while condition (described in #5245 ) by adding a handler function that applies only while loops that checks if a comment is before the end of the condition then maintains the trailing comment after the Boolean expression
I also made the formatting of comments on while loops more similar to if statements as referenced in the Issue thread

Fixes #5245.

  • 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.

@j-f1 j-f1 merged commit 2cc32da into prettier:master Oct 25, 2018
@j-f1
Copy link
Copy Markdown
Member

j-f1 commented Oct 25, 2018

Thanks for contributing!

@ikatyang ikatyang added this to the 1.15 milestone Oct 25, 2018
ikatyang added a commit to ikatyang/prettier that referenced this pull request 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.

4 participants