diff --git a/Cargo.lock b/Cargo.lock index 569fd34..a27239a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -522,7 +522,7 @@ dependencies = [ "test-case", "thiserror", "walkdir", - "yaml-rust", + "yaml-rust 0.4.5 (git+https://github.com/federico-terzi/yaml-rust)", ] [[package]] @@ -1412,7 +1412,7 @@ dependencies = [ "dtoa", "linked-hash-map", "serde", - "yaml-rust", + "yaml-rust 0.4.5 (registry+https://github.com/rust-lang/crates.io-index)", ] [[package]] @@ -1803,6 +1803,14 @@ dependencies = [ "linked-hash-map", ] +[[package]] +name = "yaml-rust" +version = "0.4.5" +source = "git+https://github.com/federico-terzi/yaml-rust#b1a195252fcdabf743f68d03f4d84d151a5a3f62" +dependencies = [ + "linked-hash-map", +] + [[package]] name = "zip" version = "0.5.12" diff --git a/espanso-migrate/Cargo.toml b/espanso-migrate/Cargo.toml index 00e2b7e..16aaab8 100644 --- a/espanso-migrate/Cargo.toml +++ b/espanso-migrate/Cargo.toml @@ -13,7 +13,7 @@ regex = "1.4.3" lazy_static = "1.4.0" dunce = "1.0.1" walkdir = "2.3.1" -yaml-rust = "0.4.5" +yaml-rust = { git = "https://github.com/federico-terzi/yaml-rust" } path-slash = "0.1.4" tempdir = "0.3.7" fs_extra = "1.2.0" diff --git a/espanso-migrate/src/render.rs b/espanso-migrate/src/render.rs index 8194be9..63a3629 100644 --- a/espanso-migrate/src/render.rs +++ b/espanso-migrate/src/render.rs @@ -35,6 +35,7 @@ pub fn render(converted_files: HashMap) -> Result Result { let mut dump_str = String::new(); let mut emitter = YamlEmitter::new(&mut dump_str); + emitter.multiline_strings(true); emitter.dump(&Yaml::Hash(file.content))?; let lines: Vec<&str> = dump_str.lines().collect();