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
With the following example, yamlfmt rewrites the value of "something" to not use the block scalar syntax when specifying scan_folded_as_literal=true ( yamlfmt -formatter scan_folded_as_literal=true test.yml), if there is a space character after any of the lines in the scalar. I am not an expert in YAML though, so this might be intentional, but it took me by surprise.
something: > { "foo": "bar", }
The text was updated successfully, but these errors were encountered:
This is not intentional, it's just something weird with the yaml library that I haven't been able to solve. If there is a space at the end of a block scalar string, the yaml library decides it's not printable for some reason. It's either a bug with their raw parser or something to do with the hack we have to retain newlines in formatted output.
I've got #86 open for this already. Sorry I don't have a better answer at the moment for how to resolve this; these kinds of issues in the yaml library are always the hardest to fix.
With the following example, yamlfmt rewrites the value of "something" to not use the block scalar syntax when specifying
scan_folded_as_literal=true
(yamlfmt -formatter scan_folded_as_literal=true test.yml
), if there is a space character after any of the lines in the scalar. I am not an expert in YAML though, so this might be intentional, but it took me by surprise.The text was updated successfully, but these errors were encountered: