Describe the bug
When evaluating expression with backslashes in strings, the number of backslashes in output strings got halved.
Version of yq: 4.50.1
Operating system: linux
Installed via: binary release
Incorrect behavior (string in expression)
$ yq -Pn -oj '["\\","\\\\","\\\\\\","\\\\\\\\","\\\\\\\\\\","\\\\\\\\\\\\"]'
[
"\\",
"\\",
"\\\\",
"\\\\",
"\\\\\\",
"\\\\\\"
]
$ jq -n '["\\","\\\\","\\\\\\","\\\\\\\\","\\\\\\\\\\","\\\\\\\\\\\\"]'
[
"\\",
"\\\\",
"\\\\\\",
"\\\\\\\\",
"\\\\\\\\\\",
"\\\\\\\\\\\\"
]
Correct behavior (string from input)
$ yq -P -oj <<< '["\\","\\\\","\\\\\\","\\\\\\\\","\\\\\\\\\\","\\\\\\\\\\\\"]'
[
"\\",
"\\\\",
"\\\\\\",
"\\\\\\\\",
"\\\\\\\\\\",
"\\\\\\\\\\\\"
]
Describe the bug
When evaluating expression with backslashes in strings, the number of backslashes in output strings got halved.
Version of yq: 4.50.1
Operating system: linux
Installed via: binary release
Incorrect behavior (string in expression)
Correct behavior (string from input)