From a3f659d2c0bccd01d2eceba8756c728f90d4f231 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Sun, 25 Mar 2018 18:11:38 +0300 Subject: Muse writer: escape ordered list markers Also reduced amount of tags in output to avoid escaping every "-" and word that ends in a full stop. --- test/Tests/Writers/Muse.hs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'test/Tests/Writers') diff --git a/test/Tests/Writers/Muse.hs b/test/Tests/Writers/Muse.hs index 3c5d1511a..1412739cb 100644 --- a/test/Tests/Writers/Muse.hs +++ b/test/Tests/Writers/Muse.hs @@ -312,16 +312,17 @@ tests = [ testGroup "block elements" -- We don't want colons to be escaped if they can't be confused -- with definition list item markers. , "do not escape colon" =: str ":" =?> ":" - , "escape - to avoid accidental unordered lists" =: text " - foo" =?> " - foo" + , "escape - to avoid accidental unordered lists" =: text " - foo" =?> " - foo" , "escape - inside a list to avoid accidental nested unordered lists" =: bulletList [ (para $ text "foo") <> (para $ text "- bar") ] =?> unlines [ " - foo" , "" - , " - bar" + , " - bar" ] - , "escape ; to avoid accidental comments" =: text "; foo" =?> "; foo" + , "escape ; to avoid accidental comments" =: text "; foo" =?> "; foo" + , "escape ; after softbreak" =: text "foo" <> softbreak <> text "; bar" =?> "foo\n; bar" ] , testGroup "emphasis" [ "emph" =: emph (text "foo") =?> "foo" @@ -408,7 +409,7 @@ tests = [ testGroup "block elements" , "empty span with anchor" =: spanWith ("anchor", [], []) (mempty) =?> "#anchor" , "empty span without class and anchor" =: spanWith ("", [], []) (mempty) - =?> "" + =?> "" , "span with class and anchor" =: spanWith ("anchor", ["foo"], []) (text "bar") =?> "#anchor bar" , "adjacent spans" =: spanWith ("", ["syllable"], []) (str "wa") <> -- cgit v1.2.3