You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When the yaml file is organized in a certain way, yamlfix generates invalid YAML as the output.
Steps to reproduce
This is the smallest file that reproduces the issue:
---
- a: |- # comment content
Run yamlfix <file.yaml>
Current behavior
This is the resulting file, which is not valid YAML.
---
- a: |- # comment content
Desired behavior
I would expect the comment to be left as it is, not shifted right. I think yamlfix is treating the comment as a comment instead of text under the |- block.
The interesting bit is that this only manifests when the top level object is a list! (When top level is a dict, this doesn't happen).
First of all, thank you for this fantastic tool!
Now to the issue :)
Description
When the yaml file is organized in a certain way, yamlfix generates invalid YAML as the output.
Steps to reproduce
yamlfix <file.yaml>
Current behavior
This is the resulting file, which is not valid YAML.
Desired behavior
I would expect the comment to be left as it is, not shifted right. I think yamlfix is treating the comment as a comment instead of text under the
|-
block.The interesting bit is that this only manifests when the top level object is a list! (When top level is a dict, this doesn't happen).
^ This is left as it is.
Environment
The text was updated successfully, but these errors were encountered: