Skip to content

Commit

Permalink
writer: emit multiline yaml strings
Browse files Browse the repository at this point in the history
Use a forked version of yaml-rust to support multiline strings.

Related-to: chyh1990/yaml-rust#137
  • Loading branch information
davvid committed Jan 31, 2021
1 parent ba1e3cf commit 4d92ace
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ shlex = "0.1"
subprocess = "0.1"
thiserror = "1.0"
xdg = "2.2"
yaml-rust = "0.4"
yaml-rust = { git = "git://github.com/davvid/yaml-rust.git", branch = "multiline-strings" }
yansi = "0.5"
1 change: 1 addition & 0 deletions src/config/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ where
let mut out_str = String::new();
{
let mut emitter = YamlEmitter::new(&mut out_str);
emitter.multiline_strings(true);
emitter.dump(&doc).ok(); // dump the YAML object to a String
}
out_str += "\n";
Expand Down

0 comments on commit 4d92ace

Please sign in to comment.