aboutsummaryrefslogtreecommitdiff
path: root/test/Tests/Readers
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2017-09-11 17:30:15 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2017-09-11 18:34:32 +0300
commit8e4ee6656399e897367ea874fe494c35e2715ac9 (patch)
treea15c38a2e2c7f7be8648d32685a5ecfd5e0891b2 /test/Tests/Readers
parent7df095f049d8499972af966d4622d20b5a465900 (diff)
downloadpandoc-8e4ee6656399e897367ea874fe494c35e2715ac9.tar.gz
Muse reader: allow inline markup to be followed by punctuation
Previously code was not allowed to be followed by comma, and emphasis was allowed to be followed by letter.
Diffstat (limited to 'test/Tests/Readers')
-rw-r--r--test/Tests/Readers/Muse.hs20
1 files changed, 18 insertions, 2 deletions
diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs
index 66c6ea7f2..03dd895e0 100644
--- a/test/Tests/Readers/Muse.hs
+++ b/test/Tests/Readers/Muse.hs
@@ -34,9 +34,21 @@ tests =
"Hello, World" =?>
para "Hello, World"
- , "Emphasis" =: "*Foo bar*" =?> para (emph . spcSep $ ["Foo", "bar"])
+ , "Emphasis" =:
+ "*Foo bar*" =?>
+ para (emph . spcSep $ ["Foo", "bar"])
- , "Emphasis tag" =: "<em>Foo bar</em>" =?> para (emph . spcSep $ ["Foo", "bar"])
+ , "Comma after closing *" =:
+ "Foo *bar*, baz" =?>
+ para ("Foo " <> emph "bar" <> ", baz")
+
+ , "Letter after closing *" =:
+ "Foo *bar*x baz" =?>
+ para "Foo *bar*x baz"
+
+ , "Emphasis tag" =:
+ "<em>Foo bar</em>" =?>
+ para (emph . spcSep $ ["Foo", "bar"])
, "Strong" =:
"**Cider**" =?>
@@ -82,6 +94,10 @@ tests =
, "Not code if opening = is detached" =: "= this is not a code=" =?> para "= this is not a code="
+ , "Code if followed by comma" =:
+ "Foo =bar=, baz" =?>
+ para (text "Foo " <> code "bar" <> text ", baz")
+
, "One character code" =: "=c=" =?> para (code "c")
, "Three = characters is not a code" =: "===" =?> para "==="