Is this the expected block style behaviour? #696
-
I have some yaml with the following block style:
When yq processes it I get:
Of course, this how it is supposed to be interpreted, but as this is an instruction for the destination application and not yq, I do not yq to modify the yaml in this way. Is this a reasonable expectation or am I using yq in a way it is not designed to be used? Perhaps that could be toggled? With |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
This is the result of the underlying yaml parser, which occasionally mangles white space), however generally this only affects human readability of the yaml file, not processing. TLDR: The two string values should be equivalent (ref https://yaml-multiline.info/) |
Beta Was this translation helpful? Give feedback.
-
Thanks, Mike. This is editing a docker-compose.yml file and it seems that it doesn't matter for processing after all (I thought I had tested and it had). I also switched the block style to to |
Beta Was this translation helpful? Give feedback.
Thanks, Mike. This is editing a docker-compose.yml file and it seems that it doesn't matter for processing after all (I thought I had tested and it had). I also switched the block style to to
|-
and everything worked as expected still! So that might be the better solution. Thanks again.