aboutsummaryrefslogtreecommitdiff
path: root/test/Tests/Writers
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2018-03-14 12:23:51 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2018-04-01 19:39:18 +0300
commitaca4137c4094ec921276bf50278dfc58db5634a3 (patch)
tree09d52083fa7f061146b5cd5c175c2cb0710bbe14 /test/Tests/Writers
parentbdb84246970151dd9bbb7a0713e36707488f9d97 (diff)
downloadpandoc-aca4137c4094ec921276bf50278dfc58db5634a3.tar.gz
Muse writer: only escape brackets when necessary
It includes cases when they can be mistaken for footnotes and links, as well as inside link description.
Diffstat (limited to 'test/Tests/Writers')
-rw-r--r--test/Tests/Writers/Muse.hs3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/Tests/Writers/Muse.hs b/test/Tests/Writers/Muse.hs
index 88d2db8cf..eca7ed736 100644
--- a/test/Tests/Writers/Muse.hs
+++ b/test/Tests/Writers/Muse.hs
@@ -301,8 +301,11 @@ tests = [ testGroup "block elements"
[ testGroup "string"
[ "string" =: str "foo" =?> "foo"
, "escape footnote" =: str "[1]" =?> "<verbatim>[1]</verbatim>"
+ , "do not escape brackets" =: str "[12ab]" =?> "[12ab]"
, "escape verbatim close tag" =: str "foo</verbatim>bar"
=?> "<verbatim>foo<</verbatim><verbatim>/verbatim>bar</verbatim>"
+ , "escape link-like text" =: str "[[https://www.example.org]]"
+ =?> "<verbatim>[[https://www.example.org]]</verbatim>"
, "escape pipe to avoid accidental tables" =: str "foo | bar"
=?> "<verbatim>foo | bar</verbatim>"
, "escape hash to avoid accidental anchors" =: text "#foo bar"