New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multiline Sting replaced with escaped single line String #2030
Comments
So, I found the problem! Whenever there is a white-space character behind any String, then a reformat happens. In the example above, there was a blank behind |
Also, this is true vor any String. Whenever there is a white-space character after any string, yq will transform multi-line Strings in a single line String. |
Describe the bug
A clear and concise description of what the bug is.
Note that any how to questions should be posted in the discussion board and not raised as an issue.
Version of yq: 4.43.1
Operating system: Linux / Debian 12
Installed via: Github Release
Input Yaml
Concise yaml document(s) (as simple as possible to show the bug, please keep it to 10 lines or less)
data1.yml:
Command
The command you ran:
Actual behavior
Expected behavior
No changes at all. Should be identical to input file. Instead the multi-line String was replaces with a single, long String wherein e.g. quotes and new lines are replaced with escape sequences.
Additional context
yq '.spec.config' file.yaml
In this case, the output format of this part is untouched and as expected!
The text was updated successfully, but these errors were encountered: