YAML: Preserve blank lines in comments (#8356)

* YAML: Fix ugly comments

* Add changelog

* Use common utils
This commit is contained in:
fisker Cheung authored and GitHub committed 2020-05-21 19:24:51 +03:00
1 parent 5da4c21219
commit ea84392af2
6 files changed
+277 -2

No files matched your search

+54
View File
@@ -0,0 +1,54 @@
#### Preserve blank lines in comments ([#8356](https://github.com/prettier/prettier/pull/8356) by [@fisker](https://github.com/fisker))
<!-- prettier-ignore -->
```yaml
# Input
a:
- a: a
# - b: b
# - c: c
- d: d
b:
- a: a
# - b: b
# - c: c
# Prettier stable
a:
- a: a
# - b: b
# - c: c
- d: d
b:
- a: a
# - b: b
# - c: c
// Prettier master
a:
- a: a
# - b: b
# - c: c
- d: d
b:
- a: a
# - b: b
# - c: c
```