yamlfix
yamlfix copied to clipboard
Yamlfix squashes comments inside { }
Description
It seems to be that yamlfix squashes comments in { }, for example: test.yaml:
---
apiVersion: v1
metadata:
annotations:
{
a : b,
# test
#
#
}
Steps to reproduce
- Run cat test.yaml | yamlfix -
---
apiVersion: v1
metadata:
annotations: {a: b}
(Comments disappeared.)
Current behavior
See above.
Desired behavior
The output has to be like:
---
apiVersion: v1
metadata:
annotations: {
a: b
# test
#
#
}
Environment
yamlfix: 1.16.0
Python: 3.11.7
Platform: macOS-13.6.4-arm64-arm-64bit
Thank you.