Muse writer: escape ";" to avoid accidental comments

This commit is contained in:
Alexander Krotov 2018-03-20 11:24:19 +03:00
parent d63bba3066
commit 268c73c873
2 changed files with 3 additions and 1 deletions

View file

@ -290,7 +290,8 @@ conditionalEscapeString s =
"::" `isInfixOf` s ||
"----" `isInfixOf` s ||
"~~" `isInfixOf` s ||
"-" == s
"-" == s ||
";" == s
then escapeString s
else s

View file

@ -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>"