Skip to content

Conversation

@braydonk
Copy link
Collaborator

Updates yaml library to v0.9.0. This includes braydonk/yaml#21

Fixes #236 and #147

@braydonk
Copy link
Collaborator Author

Note to future self: One change caught by integration tests, but I don't think it's a big deal. In the past, The head comment of the first element when include_document_start is not set would have a newline due to the old way the yaml library handled document start head comments (putting in a break indiscriminately 🤷)

Now this will no longer happen. However, if a user actually wants the initial forced newline after the top comment in a document, they can turn on retain_line_breaks and put that newline in and it will still work the same as always.

@braydonk braydonk merged commit 928ce33 into google:main Feb 10, 2025
5 checks passed
braydonk added a commit that referenced this pull request May 17, 2025
* update yaml to v0.9.0

* update test yaml files
steeef pushed a commit to steeef/yamlfmt that referenced this pull request Sep 5, 2025
* update yaml to v0.9.0

* update test yaml files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: when document start have comments before, formatter moves it on top of the file.

1 participant