@@ -283,6 +283,7 @@ tests = [ testGroup "block elements"
283283 , "don't escape horizontal inside paragraph" =: para (text "foo ---- bar") =?> "foo ---- bar"
284284 , "escape nonbreaking space" =: para (text "~~") =?> "<verbatim>~~</verbatim>"
285285 , "escape > in the beginning of line" =: para (text "> foo bar") =?> "<verbatim></verbatim>> foo bar"
286+ , "escape string with > and space in the beginning of line" =: para (str "> foo bar") =?> "<verbatim></verbatim>> foo bar"
286287 , testGroup "tables"
287288 [ "table without header" =:
288289 let rows = [[para $ text "Para 1.1", para $ text "Para 1.2"]
@@ -348,6 +349,14 @@ tests = [ testGroup "block elements"
348349 , ""
349350 , " <verbatim></verbatim>- bar"
350351 ]
352+ , "escape strings starting with - inside a list" =:
353+ bulletList [ para (str "foo") <>
354+ para (str "- bar")
355+ ] =?>
356+ unlines [ " - foo"
357+ , ""
358+ , " <verbatim></verbatim>- bar"
359+ ]
351360 , "escape - inside a note" =:
352361 note (para (text "- foo")) =?>
353362 unlines [ "[1]"
@@ -355,6 +364,7 @@ tests = [ testGroup "block elements"
355364 , "[1] <verbatim></verbatim>- foo"
356365 ]
357366 , "escape ; to avoid accidental comments" =: text "; foo" =?> "<verbatim></verbatim>; foo"
367+ , "escape strings starting with ; and space" =: str "; foo" =?> "<verbatim></verbatim>; foo"
358368 , "escape ; after softbreak" =: text "foo" <> softbreak <> text "; bar" =?> "foo\n<verbatim></verbatim>; bar"
359369 , "escape ; after linebreak" =: text "foo" <> linebreak <> text "; bar" =?> "foo<br>\n<verbatim></verbatim>; bar"
360370 , "do not escape ; inside paragraph" =: text "foo ; bar" =?> "foo ; bar"