aboutsummaryrefslogtreecommitdiff
path: root/tests/Tests/Writers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-04-18 10:45:46 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-04-18 10:58:50 -0700
commitd20152e01135a27decfd08dbda097fd1fda75354 (patch)
tree7fe7923a954877b446f3fefffa7c8d1c478db4b7 /tests/Tests/Writers
parent0b80073e7c10d7413fd40ac70ba6bd5eaf58cd45 (diff)
downloadpandoc-d20152e01135a27decfd08dbda097fd1fda75354.tar.gz
Markdown writer: improved escaping.
`<` should not be escaped as `\<`, for compatibility with original Markdown. We now escape `<` and `>` with entities. Also, we now backslash-escape square brackets. Closes #2086.
Diffstat (limited to 'tests/Tests/Writers')
-rw-r--r--tests/Tests/Writers/Markdown.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/Tests/Writers/Markdown.hs b/tests/Tests/Writers/Markdown.hs
index dce40ddcb..8ffd7a8c0 100644
--- a/tests/Tests/Writers/Markdown.hs
+++ b/tests/Tests/Writers/Markdown.hs
@@ -84,13 +84,13 @@ shortcutLinkRefsTests =
]
, "Reference link is followed by text in brackets"
=: (para ((link "/url" "" "link") <> "[text in brackets]"))
- =?> unlines [ "[link][][text in brackets]"
+ =?> unlines [ "[link][]\\[text in brackets\\]"
, ""
, " [link]: /url"
]
, "Reference link is followed by space and text in brackets"
=: (para ((link "/url" "" "link") <> " [text in brackets]"))
- =?> unlines [ "[link][] [text in brackets]"
+ =?> unlines [ "[link][] \\[text in brackets\\]"
, ""
, " [link]: /url"
]