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
Describe the bug
I think I have found an ugly sibling of #566, where a leading space in a string to be rendered in the literal style produces a little awkward output, that doesn't seem to be a valid YAML. Although yq itself (and yj, both based on the go-yaml/yaml module) can read it back 😏, other parsers like the Online Yaml Parser are not that cool with it.
Version of yq: 4.44.3
Operating system: linux_amd64
Installed via: binary release
Input Yaml
input.yaml:
value: " with leading spaces"
Command
yq '.value style = "literal"' input.yaml
Actual behavior
value:2-with leading spaces
Expected behavior
value: |2- with leading spaces
Additional context
Simply, the space and the pipe character ( |) prefix seems to be missing in this case.
I fear this would be yet another transitive case for https://github.com/go-yaml/yaml/issues 😞
The text was updated successfully, but these errors were encountered:
Describe the bug
I think I have found an ugly sibling of #566, where a leading space in a string to be rendered in the
literal
style produces a little awkward output, that doesn't seem to be a valid YAML. Althoughyq
itself (andyj
, both based on thego-yaml/yaml
module) can read it back 😏, other parsers like the Online Yaml Parser are not that cool with it.Version of yq: 4.44.3
Operating system: linux_amd64
Installed via: binary release
Input Yaml
input.yaml:
Command
Actual behavior
Expected behavior
Additional context
Simply, the space and the pipe character (
|
) prefix seems to be missing in this case.I fear this would be yet another transitive case for https://github.com/go-yaml/yaml/issues 😞
The text was updated successfully, but these errors were encountered: