mirror of
https://github.com/jgm/pandoc.git
synced 2026-09-19 02:22:09 +08:00
Muse writer: escape nonbreaking space ("~~")
This commit is contained in:
@@ -290,7 +290,8 @@ conditionalEscapeString :: String -> String
|
||||
conditionalEscapeString s =
|
||||
if any (`elem` ("#*<=>[]|" :: String)) s ||
|
||||
"::" `isInfixOf` s ||
|
||||
"----" `isInfixOf` s
|
||||
"----" `isInfixOf` s ||
|
||||
"~~" `isInfixOf` s
|
||||
then escapeString s
|
||||
else s
|
||||
|
||||
|
||||
@@ -251,6 +251,7 @@ tests = [ testGroup "block elements"
|
||||
]
|
||||
, "horizontal rule" =: horizontalRule =?> "----"
|
||||
, "escape horizontal rule" =: para (text "----") =?> "<verbatim>----</verbatim>"
|
||||
, "escape nonbreaking space" =: para (text "~~") =?> "<verbatim>~~</verbatim>"
|
||||
, testGroup "tables"
|
||||
[ "table without header" =:
|
||||
let rows = [[para $ text "Para 1.1", para $ text "Para 1.2"]
|
||||
|
||||
Reference in New Issue
Block a user