@@ -283,6 +283,7 @@ tests = [ testGroup "block elements"
283 , "don't escape horizontal inside paragraph" =: para (text "foo ---- bar") =?> "foo ---- bar"
283 , "don't escape horizontal inside paragraph" =: para (text "foo ---- bar") =?> "foo ---- bar"
284 , "escape nonbreaking space" =: para (text "~~") =?> "<verbatim>~~</verbatim>"
284 , "escape nonbreaking space" =: para (text "~~") =?> "<verbatim>~~</verbatim>"
285 , "escape > in the beginning of line" =: para (text "> foo bar") =?> "<verbatim></verbatim>> foo bar"
285 , "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"
286 , testGroup "tables"
287 , testGroup "tables"
287 [ "table without header" =:
288 [ "table without header" =:
288 let rows = [[para $ text "Para 1.1", para $ text "Para 1.2"]
289 let rows = [[para $ text "Para 1.1", para $ text "Para 1.2"]
@@ -348,6 +349,14 @@ tests = [ testGroup "block elements"
349 , " <verbatim></verbatim>- bar"
350 , " <verbatim></verbatim>- bar"
352+ , "escape strings starting with - inside a list" =:
353+ bulletList [ para (str "foo") <>
358+ , " <verbatim></verbatim>- bar"
351 , "escape - inside a note" =:
360 , "escape - inside a note" =:
352 note (para (text "- foo")) =?>
361 note (para (text "- foo")) =?>
353 unlines [ "[1]"
362 unlines [ "[1]"
@@ -355,6 +364,7 @@ tests = [ testGroup "block elements"
355 , "[1] <verbatim></verbatim>- foo"
364 , "[1] <verbatim></verbatim>- foo"
357 , "escape ; to avoid accidental comments" =: text "; foo" =?> "<verbatim></verbatim>; foo"
366 , "escape ; to avoid accidental comments" =: text "; foo" =?> "<verbatim></verbatim>; foo"
367+ , "escape strings starting with ; and space" =: str "; foo" =?> "<verbatim></verbatim>; foo"
358 , "escape ; after softbreak" =: text "foo" <> softbreak <> text "; bar" =?> "foo\n<verbatim></verbatim>; bar"
368 , "escape ; after softbreak" =: text "foo" <> softbreak <> text "; bar" =?> "foo\n<verbatim></verbatim>; bar"
359 , "escape ; after linebreak" =: text "foo" <> linebreak <> text "; bar" =?> "foo<br>\n<verbatim></verbatim>; bar"
369 , "escape ; after linebreak" =: text "foo" <> linebreak <> text "; bar" =?> "foo<br>\n<verbatim></verbatim>; bar"
360 , "do not escape ; inside paragraph" =: text "foo ; bar" =?> "foo ; bar"
370 , "do not escape ; inside paragraph" =: text "foo ; bar" =?> "foo ; bar"