fix(yaml): do not insert line break before an empty map or sequence (#17513)
Co-authored-by: fisker <lionkay@gmail.com>
This commit is contained in:
1 parent
94d6bbae8e
commit
2e608cd8f1
4 files changed
+100
No files matched your search
@@ -0,0 +1,27 @@
|
||||
#### Do not add line break before empty map or sequence (#16074 by @BapRx)
|
||||
|
||||
<!-- prettier-ignore -->
|
||||
```yaml
|
||||
# Input
|
||||
---
|
||||
myDict: {}
|
||||
# comment
|
||||
myList: []
|
||||
# comment
|
||||
|
||||
# Prettier stable
|
||||
---
|
||||
myDict:
|
||||
{}
|
||||
# comment
|
||||
myList:
|
||||
[]
|
||||
# comment
|
||||
|
||||
# Prettier main
|
||||
---
|
||||
myDict: {}
|
||||
# comment
|
||||
myList: []
|
||||
# comment
|
||||
```
|
||||
Reference in new issue
Block a user