diff options
author | Alexander Krotov <ilabdsf@gmail.com> | 2018-09-11 11:35:25 +0300 |
---|---|---|
committer | Alexander Krotov <ilabdsf@gmail.com> | 2018-09-11 11:35:25 +0300 |
commit | cb28cab489279c48f0afd7113a75ccd96f43eaba (patch) | |
tree | 60ba763e0d8f472dce348e32d8ef227018b93cd2 /test | |
parent | 67bcb3d6b54660acf90452cd2e44203b991131e2 (diff) | |
download | pandoc-cb28cab489279c48f0afd7113a75ccd96f43eaba.tar.gz |
Muse writer: escape -, ; and > in the beginning of strings
Diffstat (limited to 'test')
-rw-r--r-- | test/Tests/Writers/Muse.hs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Tests/Writers/Muse.hs b/test/Tests/Writers/Muse.hs index 7821f4e96..a8ccd6d87 100644 --- a/test/Tests/Writers/Muse.hs +++ b/test/Tests/Writers/Muse.hs @@ -283,6 +283,7 @@ tests = [ testGroup "block elements" , "don't escape horizontal inside paragraph" =: para (text "foo ---- bar") =?> "foo ---- bar" , "escape nonbreaking space" =: para (text "~~") =?> "<verbatim>~~</verbatim>" , "escape > in the beginning of line" =: para (text "> foo bar") =?> "<verbatim></verbatim>> foo bar" + , "escape string with > and space in the beginning of line" =: para (str "> foo bar") =?> "<verbatim></verbatim>> foo bar" , testGroup "tables" [ "table without header" =: let rows = [[para $ text "Para 1.1", para $ text "Para 1.2"] @@ -348,6 +349,14 @@ tests = [ testGroup "block elements" , "" , " <verbatim></verbatim>- bar" ] + , "escape strings starting with - inside a list" =: + bulletList [ para (str "foo") <> + para (str "- bar") + ] =?> + unlines [ " - foo" + , "" + , " <verbatim></verbatim>- bar" + ] , "escape - inside a note" =: note (para (text "- foo")) =?> unlines [ "[1]" @@ -355,6 +364,7 @@ tests = [ testGroup "block elements" , "[1] <verbatim></verbatim>- foo" ] , "escape ; to avoid accidental comments" =: text "; foo" =?> "<verbatim></verbatim>; foo" + , "escape strings starting with ; and space" =: str "; foo" =?> "<verbatim></verbatim>; foo" , "escape ; after softbreak" =: text "foo" <> softbreak <> text "; bar" =?> "foo\n<verbatim></verbatim>; bar" , "escape ; after linebreak" =: text "foo" <> linebreak <> text "; bar" =?> "foo<br>\n<verbatim></verbatim>; bar" , "do not escape ; inside paragraph" =: text "foo ; bar" =?> "foo ; bar" |