git.iko.soy/typeable/pandoc
on master help sign in
Muse writer: escape ";" to avoid accidental comments
268c73cAlexander Krotov
src/Text/Pandoc/Writers/Muse.hs+2−1
@@ -290,7 +290,8 @@ conditionalEscapeString s =
290 "::" `isInfixOf` s ||
290 "::" `isInfixOf` s ||
291 "----" `isInfixOf` s ||
291 "----" `isInfixOf` s ||
292 "~~" `isInfixOf` s ||
292 "~~" `isInfixOf` s ||
293− "-" == s
293+ "-" == s ||
294+ ";" == s
294 then escapeString s
295 then escapeString s
295 else s
296 else s
296
297
test/Tests/Writers/Muse.hs+1
@@ -321,6 +321,7 @@ tests = [ testGroup "block elements"
321 , ""
321 , ""
322 , " <verbatim>-</verbatim> bar"
322 , " <verbatim>-</verbatim> bar"
323 ]
323 ]
324+ , "escape ; to avoid accidental comments" =: text "; foo" =?> "<verbatim>;</verbatim> foo"
324 ]
325 ]
325 , testGroup "emphasis"
326 , testGroup "emphasis"
326 [ "emph" =: emph (text "foo") =?> "<em>foo</em>"
327 [ "emph" =: emph (text "foo") =?> "<em>foo</em>"