Skip to content

Commit

Permalink
Change paragraph translations to use \n instead of key combos
Browse files Browse the repository at this point in the history
  • Loading branch information
sammdot committed Oct 17, 2021
1 parent 92f22f4 commit b342c0d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/test_translation_parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@ fn test_mode() {

#[test]
fn test_par() {
check_tl!("\\par\\s0 ", "{#return}{#return}");
check_tl!("\\par\\s1 ", "{#return}{#return} ");
check_tl!("\\par\\s0 ", "{^\\n\\n^}");
check_tl!("\\par\\s1 ", "{^\\n\\n^} ");
}

#[test]
Expand Down
2 changes: 1 addition & 1 deletion src/translation_parse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!("{{#return}}{{#return}}{}",
Object::Paragraph(mode) => format!("{{^\\n\\n^}}{}",
match mode { ParagraphMode::Default => "", ParagraphMode::Contin => " " }),
Object::Fingerspell(letters) => format!("{{&{}}}", letters),
Object::Stitch(letters) => format!("{{:stitch:{}}}", letters),
Expand Down

0 comments on commit b342c0d

Please sign in to comment.