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