aboutsummaryrefslogtreecommitdiff
path: root/test/Tests
diff options
context:
space:
mode:
authorAlexander Krotov <ilabdsf@gmail.com>2017-09-09 11:51:36 +0300
committerAlexander Krotov <ilabdsf@gmail.com>2017-09-09 16:39:06 +0300
commit2230371304f299ca7333af8ad0ee7bcd099a4aa0 (patch)
tree8095129fd8fa14c89a8e97b90967cd2b14b0a8a8 /test/Tests
parent23582298765cb960507a5eaa507921a7adae6abb (diff)
downloadpandoc-2230371304f299ca7333af8ad0ee7bcd099a4aa0.tar.gz
Muse reader: debug inline code markup
Diffstat (limited to 'test/Tests')
-rw-r--r--test/Tests/Readers/Muse.hs34
1 files changed, 32 insertions, 2 deletions
diff --git a/test/Tests/Readers/Muse.hs b/test/Tests/Readers/Muse.hs
index dac167a92..6f602d7c3 100644
--- a/test/Tests/Readers/Muse.hs
+++ b/test/Tests/Readers/Muse.hs
@@ -72,9 +72,39 @@ tests =
, "Linebreak" =: "Line <br> break" =?> para ("Line" <> linebreak <> "break")
- , "Code" =: "=foo(bar)=" =?> para (code "foo(bar)")
+ , testGroup "Code markup"
+ [ "Code" =: "=foo(bar)=" =?> para (code "foo(bar)")
- , "Not code" =: "a=b= =c=d" =?> para (text "a=b= =c=d")
+ , "Not code" =: "a=b= =c=d" =?> para (text "a=b= =c=d")
+
+ -- Emacs Muse 3.20 parses this as code, we follow Amusewiki
+ , "Not code if closing = is detached" =: "=this is not a code =" =?> para "=this is not a code ="
+
+ , "Not code if opening = is detached" =: "= this is not a code=" =?> para "= this is not a code="
+
+ , "One character code" =: "=c=" =?> para (code "c")
+
+ , "Three = characters is not a code" =: "===" =?> para "==="
+
+ , "Multiline code markup" =:
+ "foo =bar\nbaz= end of code" =?>
+ para (text "foo " <> code "bar\nbaz" <> text " end of code")
+
+{- Emacs Muse 3.20 has a bug: it publishes
+ - <p>foo <code>bar
+ -
+ - baz</code> foo</p>
+ - which is displayed as one paragraph by browsers.
+ - We follow Amusewiki here and avoid joining paragraphs.
+ -}
+ , "No multiparagraph code" =:
+ T.unlines [ "foo =bar"
+ , ""
+ , "baz= foo"
+ ] =?>
+ para "foo =bar" <>
+ para "baz= foo"
+ ]
, "Code tag" =: "<code>foo(bar)</code>" =?> para (code "foo(bar)")