Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Yamlfix squashes comments inside { } #276

Open
vtsarfin-cg opened this issue Feb 7, 2024 · 0 comments
Open

Yamlfix squashes comments inside { } #276

vtsarfin-cg opened this issue Feb 7, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@vtsarfin-cg
Copy link

vtsarfin-cg commented Feb 7, 2024

Description

It seems to be that yamlfix squashes comments in { }, for example:
test.yaml:

---
apiVersion: v1
metadata:
  annotations: 
    {
      a : b,
      # test
        #
      #
  
    }

Steps to reproduce

  1. 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.

@vtsarfin-cg vtsarfin-cg added the bug Something isn't working label Feb 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant