diff options
| author | Teddy Wing | 2022-03-19 21:07:41 +0100 | 
|---|---|---|
| committer | Teddy Wing | 2022-03-19 21:07:41 +0100 | 
| commit | 2a0182af66a64756eaa88d64e44a18ee5fb94bce (patch) | |
| tree | bd042489a5f81766bf07166736bf357855bf518a /src | |
| parent | d5c62cac01103881b8c8f8d629bc2eb0d12723c7 (diff) | |
| download | yaqlite-2a0182af66a64756eaa88d64e44a18ee5fb94bce.tar.bz2 | |
main: Emit multiline YAML output
Only works with `|` YAML instead of `>` flowed output.
Use a forked `yaml-rust` crate published by
https://github.com/davvid/yaml-rust that includes a patch to support
multiline output.
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.rs | 1 | 
1 files changed, 1 insertions, 0 deletions
| diff --git a/src/main.rs b/src/main.rs index 8b4cb5b..c21dee4 100644 --- a/src/main.rs +++ b/src/main.rs @@ -98,6 +98,7 @@ fn main() {              let mut stdout_handle = stdout.lock();              let mut buffer = yaqlite::yaml::IoAdapter::new(&mut stdout_handle);              let mut emitter = yaml_rust::YamlEmitter::new(&mut buffer); +            emitter.multiline_strings(true);              emitter.dump(&yaml_data).unwrap();              // YamlEmitter doesn't output a trailing newline. | 
