Fix handling comments in labeled statements (#6984)
This commit is contained in:
1 parent
a1423e05b4
commit
262f27bc61
4 files changed
+39
-1
No files matched your search
@@ -0,0 +1,23 @@
|
||||
#### Fix formatting of labeled statements with comments ([#6994](https://github.com/prettier/prettier/pull/6984) by [@clement26695](https://github.com/clement26695))
|
||||
|
||||
Formatting of comments in labeled statements was not stable
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```jsx
|
||||
// Input
|
||||
loop1:
|
||||
//test
|
||||
const i = 3;
|
||||
|
||||
// Prettier stable (first output)
|
||||
loop1: //test
|
||||
const i = 3;
|
||||
|
||||
// Prettier stable (second output)
|
||||
//test
|
||||
loop1: const i = 3;
|
||||
|
||||
// Prettier master (first output)
|
||||
//test
|
||||
loop1: const i = 3;
|
||||
```
|
||||
Reference in new issue
Block a user