diff --git a/src/Text/Pandoc/Writers/Muse.hs b/src/Text/Pandoc/Writers/Muse.hs index e72fcf52b..eb1821922 100644 --- a/src/Text/Pandoc/Writers/Muse.hs +++ b/src/Text/Pandoc/Writers/Muse.hs @@ -290,7 +290,8 @@ conditionalEscapeString s = "::" `isInfixOf` s || "----" `isInfixOf` s || "~~" `isInfixOf` s || - "-" == s + "-" == s || + ";" == s then escapeString s else s diff --git a/test/Tests/Writers/Muse.hs b/test/Tests/Writers/Muse.hs index 2728fd9f9..04f6de449 100644 --- a/test/Tests/Writers/Muse.hs +++ b/test/Tests/Writers/Muse.hs @@ -321,6 +321,7 @@ tests = [ testGroup "block elements" , "" , " <verbatim>-</verbatim> bar" ] + , "escape ; to avoid accidental comments" =: text "; foo" =?> "<verbatim>;</verbatim> foo" ] , testGroup "emphasis" [ "emph" =: emph (text "foo") =?> "<em>foo</em>"