google / google/yamlfmt

Last `label: |` reformatted into `label: |-` despite new line

Open
#261 2 comments 3 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
1.8k
Forks
75
PR merge metrics
No merged PRs in 30d

Description

There is this small quirk I am having with `yamlfmt`. This file

```yaml
label: |
foo
label: |
foo
```

is reformatted into

```yaml
label: |
foo
label: |-
foo
```

despite the presence of a new line. I tried playing with `retain_line_breaks` and `eof_newline`, to no avail. Is it something I don't understand about yaml and yamlfmt is doing the right thing? Or is there an option to remove this unnecessary '-'? Or is it a quirk that is yet to be fixed? 🙏

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.