yaml-rust
yaml-rust copied to clipboard
Emit multi-line string values as block scalars
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.