From 12464efb3a70b1be9795b977fdd47c93fdce169d Mon Sep 17 00:00:00 2001 From: Sammi De Guzman Date: Sun, 17 Oct 2021 15:29:31 -0700 Subject: [PATCH] Fix paragraph spacing --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/translation_parse.rs | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index bee9597..7a781f3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -869,7 +869,7 @@ dependencies = [ [[package]] name = "rtfcre" -version = "2.0.0-dev4" +version = "2.0.1" dependencies = [ "criterion", "encoding_rs", diff --git a/Cargo.toml b/Cargo.toml index 687ffe8..2953a4c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "rtfcre" -version = "2.0.0" +version = "2.0.1" description = "Python library for Rich Text Format with Court Reporting Extensions (RTF/CRE) dictionaries" homepage = "https://github.com/sammdot/rtfcre" authors = ["Sammi De Guzman "] diff --git a/src/translation_parse.rs b/src/translation_parse.rs index e72219c..950ad37 100644 --- a/src/translation_parse.rs +++ b/src/translation_parse.rs @@ -261,7 +261,7 @@ pub fn format_rtf_to_plover(tl: &str) -> String { let items = parse_translation(tl).iter() .map(|obj| { match obj { - Object::Paragraph(mode) => format!("{{^\\n\\n^}}{}", + Object::Paragraph(mode) => format!("{{^\n\n^}}{}", match mode { ParagraphMode::Default => "", ParagraphMode::Contin => " " }), Object::Fingerspell(letters) => format!("{{&{}}}", letters), Object::Stitch(letters) => format!("{{:stitch:{}}}", letters),