Skip to content
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

Unable to print original style of multiline string #1781

Open
a904055262 opened this issue Sep 13, 2023 · 2 comments
Open

Unable to print original style of multiline string #1781

a904055262 opened this issue Sep 13, 2023 · 2 comments
Labels

Comments

@a904055262
Copy link

a904055262 commented Sep 13, 2023

Describe the bug
Cant Printing original style when last line ends with space

Version of yq: 4.35.1
Operating system: linux

Input Yaml
data1.yml: There is a space after bbb

mstring: |-
  aaa
   bbb 

Command
The command you ran:

yq  data1.yml

Actual behavior

mstring: "aaa\n bbb "

Expected behavior

mstring: |-
  aaa
   bbb

Additional context
Add any other context about the problem here.

@a904055262 a904055262 changed the title printing cant keep origin sytle of multi line string Unable to print original style of multiline string Sep 13, 2023
@mikefarah
Copy link
Owner

This is an issue with the underlying yaml parser go-yaml - there are several issues raised against it like this, but unfortunately it has not been looked at :(

@mikefarah
Copy link
Owner

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants