Muse writer: escape nonbreaking space ("~~")
This commit is contained in:
parent
37271fabee
commit
b7d8930dc0
2 changed files with 3 additions and 1 deletions
|
@ -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"]
|
||||
|
|
Loading…
Reference in a new issue