Comments in lists are handled differently on Linux and Windows, when using retain_line_breaks_single
- Dominant language
- Go
- Stars
- 1.8k
- Forks
- 75
- PR merge metrics
- No merged PRs in 30d
Description
I'm using the same .ymlfmt file on both platforms. I am using fresh installation via `$ go install github.com/google/yamlfmt/cmd/yamlfmt@latest` on both platforms.
```
formatter:
type: basic
retain_line_breaks_single: true # retain_line_breaks also triggers this bug
```
This results in the following .yaml file being formatted differently
```
nav:
- Home:
- Welcome: index.md
- Back to Documentation Index: index.md
# - Download Now: index.md
- Troubleshooting:
- Support: troubleshooting/support.md
- FAQ: troubleshooting/faq.md
```
On windows the file stays unchanged.
On linux, the file gets formatted like this:
```
nav:
- Home:
- Welcome: index.md
- Back to Documentation Index: index.md
# - Download Now (Superhive): index.md
- Troubleshooting:
- Support: troubleshooting/support.md
- FAQ: troubleshooting/faq.md
```
Contributor guide
Assessment
This issue has not been assessed yet.