21 lines
270 B
Markdown
21 lines
270 B
Markdown
#### Fix placing leading comments for a body of while statement (#9345 by @sosukesuzuki)
|
|
|
|
<!-- prettier-ignore -->
|
|
```js
|
|
// Input
|
|
while(1) // Comment
|
|
foo();
|
|
|
|
// Prettier stable
|
|
while (
|
|
1 // Comment
|
|
)
|
|
foo();
|
|
|
|
// Prettier master
|
|
while (1)
|
|
// Comment
|
|
foo();
|
|
|
|
```
|