aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2018-03-25 18:11:38 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2018-03-25 19:28:23 +0300
commita3f659d2c0bccd01d2eceba8756c728f90d4f231 (patch)
treea0ff0c03b60838914c984db7166a27fcc30757f2 /test
parentc24c9efd98513cdaf759a819217c942ca67dcc54 (diff)
downloadpandoc-a3f659d2c0bccd01d2eceba8756c728f90d4f231.tar.gz
Muse writer: escape ordered list markers
Also reduced amount of <verbatim> tags in output to avoid escaping every "-" and word that ends in a full stop.
Diffstat (limited to 'test')
-rw-r--r--test/Tests/Writers/Muse.hs9
-rw-r--r--test/writer.muse4
2 files changed, 7 insertions, 6 deletions
diff --git a/test/Tests/Writers/Muse.hs b/test/Tests/Writers/Muse.hs
index 3c5d1511a..1412739cb 100644
--- a/test/Tests/Writers/Muse.hs
+++ b/test/Tests/Writers/Muse.hs
@@ -312,16 +312,17 @@ tests = [ testGroup "block elements"
-- We don't want colons to be escaped if they can't be confused
-- with definition list item markers.
, "do not escape colon" =: str ":" =?> ":"
- , "escape - to avoid accidental unordered lists" =: text " - foo" =?> " <verbatim>-</verbatim> foo"
+ , "escape - to avoid accidental unordered lists" =: text " - foo" =?> "<verbatim></verbatim> - foo"
, "escape - inside a list to avoid accidental nested unordered lists" =:
bulletList [ (para $ text "foo") <>
(para $ text "- bar")
] =?>
unlines [ " - foo"
, ""
- , " <verbatim>-</verbatim> bar"
+ , " <verbatim></verbatim>- bar"
]
- , "escape ; to avoid accidental comments" =: text "; foo" =?> "<verbatim>;</verbatim> foo"
+ , "escape ; to avoid accidental comments" =: text "; foo" =?> "<verbatim></verbatim>; foo"
+ , "escape ; after softbreak" =: text "foo" <> softbreak <> text "; bar" =?> "foo\n<verbatim></verbatim>; bar"
]
, testGroup "emphasis"
[ "emph" =: emph (text "foo") =?> "<em>foo</em>"
@@ -408,7 +409,7 @@ tests = [ testGroup "block elements"
, "empty span with anchor" =: spanWith ("anchor", [], []) (mempty)
=?> "#anchor"
, "empty span without class and anchor" =: spanWith ("", [], []) (mempty)
- =?> "<class><verbatim></verbatim></class>"
+ =?> "<class></class>"
, "span with class and anchor" =: spanWith ("anchor", ["foo"], []) (text "bar")
=?> "#anchor <class name=\"foo\">bar</class>"
, "adjacent spans" =: spanWith ("", ["syllable"], []) (str "wa") <>
diff --git a/test/writer.muse b/test/writer.muse
index 530fb3ba5..fe278af65 100644
--- a/test/writer.muse
+++ b/test/writer.muse
@@ -245,7 +245,7 @@ Should not be a list item:
M.A. 2007
-B. Williams
+<verbatim></verbatim>B. Williams
----
@@ -594,7 +594,7 @@ Bang: !
Plus: +
-Minus: <verbatim>-</verbatim>
+Minus: -
----