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
I planned to adopt go-yaml/yaml.v3 in a small YAML formatter (simple "unmarshal and marshal"). It looks to work great with yaml.Node, it preserves comments, field ordering, but fails with the following pattern:
- first:
second: >- aaaa bbbb cccc
The outcome of formatting is:
- first:
second: >- aaaa bbbb cccc
What is more, formatting such file twice gives even worse output:
- first:
second: >- aaaa bbbb cccc
(double new line)
I wonder if I can use the library to implement a formatter.
BTW It would be great to increase the control over rendering, e.g. total line length, fields stored in memory as is (use case: I don't want to format this field).
The text was updated successfully, but these errors were encountered:
I can reproduce this, but I'm not sure how to fix this. The code which causes this is identical to the corresponding code in libyaml (and hasn't changed for many years).
Hi,
I planned to adopt go-yaml/yaml.v3 in a small YAML formatter (simple "unmarshal and marshal"). It looks to work great with
yaml.Node
, it preserves comments, field ordering, but fails with the following pattern:The outcome of formatting is:
What is more, formatting such file twice gives even worse output:
(double new line)
I wonder if I can use the library to implement a formatter.
BTW It would be great to increase the control over rendering, e.g. total line length, fields stored in memory as is (use case: I don't want to format this field).
The text was updated successfully, but these errors were encountered: