Muse writer: escape nonbreaking space ("~~")
commitb7d8930dc097defcae754120a4fa0d6727c9b265
authorAlexander Krotov <ilabdsf@gmail.com>
dateMon 29 Jan 2018, 12:54 (9 years ago)
parent37271fa
src/Text/Pandoc/Writers/Muse.hs+2−1
@@ -290,7 +290,8 @@ conditionalEscapeString :: String -> String
290290conditionalEscapeString s =
291291 if any (`elem` ("#*<=>[]|" :: String)) s ||
292292 "::" `isInfixOf` s ||
293− "----" `isInfixOf` s
293+ "----" `isInfixOf` s ||
294+ "~~" `isInfixOf` s
294295 then escapeString s
295296 else s
296297
test/Tests/Writers/Muse.hs+1
@@ -251,6 +251,7 @@ tests = [ testGroup "block elements"
251251 ]
252252 , "horizontal rule" =: horizontalRule =?> "----"
253253 , "escape horizontal rule" =: para (text "----") =?> "<verbatim>----</verbatim>"
254+ , "escape nonbreaking space" =: para (text "~~") =?> "<verbatim>~~</verbatim>"
254255 , testGroup "tables"
255256 [ "table without header" =:
256257 let rows = [[para $ text "Para 1.1", para $ text "Para 1.2"]