question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unstable comment in while

See original GitHub issue

Prettier 1.14.3 Playground link

--parser babylon

Input:

while(
    true
    // Comment
) {}

Output:

while (true) // Comment
{}

Second Output:

while (
  true // Comment
) {}

Expected behavior:

while(
    true
    // Comment
) {}

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
jaideng123commented, Oct 13, 2018

I added the changes necessary to bring the while comment formatting closer in line with if to my PR, If you’d prefer to open a separate issue I can roll them back and submit a separate PR

1reaction
jaideng123commented, Oct 11, 2018

I can work on this

Read more comments on GitHub >

github_iconTop Results From Across the Web

while loop strange and unstable behavior in a jitted function
I found that when the index of a numpy array will go out of bound inside a while-loop in a njit decorated function,...
Read more >
Unstable formatting when there is a comment after line ...
@gordonwrigley I'm curious if the reason for the line continuation being there sheds any light on the most useful behavior for Black here?...
Read more >
What does "unstable" mean? : r/rust - Reddit
When using features that are in development ( nightly a.k.a. unstable ) you have to tell explicit that you want those features. Example...
Read more >
When should NGDP be unstable? - Econlib
Yes, I've always thought NGDP per capita is better, although I have not ... When I read Scott's comment it made me think...
Read more >
All stages show up as UNSTABLE when only one stage should
Problem When there is a build which has a stage that marks the build as unstable, all the stages, parallels and steps are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found