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

Emit multi-line string values as block scalars #136

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ramosbugs
Copy link

@ramosbugs ramosbugs commented Aug 30, 2019

This PR changes the output behavior to emit multi-line string
values as block scalars instead of inline string literals with newline
characters escaped, with the aim of improving the human readability
of the emitted YAML.

For example, ["foo\nbar\nbaz"] is now emitted as:

- |-2
  foo
  bar
  baz

To properly handle trailing newlines, this PR also adds a trailing ...
document marker
following the dump output.

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

Successfully merging this pull request may close these issues.

1 participant