From 1b1b6f02d59626fac591e4ed4a2286c6effca6d2 Mon Sep 17 00:00:00 2001 From: Alexander Krotov Date: Wed, 7 Mar 2018 15:19:36 +0300 Subject: Muse writer: escape "-" to avoid creating bullet lists --- test/Tests/Writers/Muse.hs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'test/Tests/Writers/Muse.hs') diff --git a/test/Tests/Writers/Muse.hs b/test/Tests/Writers/Muse.hs index 7aec8122a..ab5eaa205 100644 --- a/test/Tests/Writers/Muse.hs +++ b/test/Tests/Writers/Muse.hs @@ -301,6 +301,15 @@ 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 - inside a list to avoid accidental nested unordered lists" =: + bulletList [ (para $ text "foo") <> + (para $ text "- bar") + ] =?> + unlines [ " - foo" + , "" + , " - bar" + ] ] , testGroup "emphasis" [ "emph" =: emph (text "foo") =?> "foo" -- cgit v1.2.3