Muse writer: escape ";" to avoid accidental comments
commit268c73c873b93daf3321d38d659be7849579c7f0
authorAlexander Krotov <ilabdsf@gmail.com>
dateTue 20 Mar 2018, 11:24 (9 years ago)
parentd63bba3
src/Text/Pandoc/Writers/Muse.hs+2−1
@@ -290,7 +290,8 @@ conditionalEscapeString s =
290290 "::" `isInfixOf` s ||
291291 "----" `isInfixOf` s ||
292292 "~~" `isInfixOf` s ||
293− "-" == s
293+ "-" == s ||
294+ ";" == s
294295 then escapeString s
295296 else s
296297
test/Tests/Writers/Muse.hs+1
@@ -321,6 +321,7 @@ tests = [ testGroup "block elements"
321321 , ""
322322 , " <verbatim>-</verbatim> bar"
323323 ]
324+ , "escape ; to avoid accidental comments" =: text "; foo" =?> "<verbatim>;</verbatim> foo"
324325 ]
325326 , testGroup "emphasis"
326327 [ "emph" =: emph (text "foo") =?> "<em>foo</em>"