aboutsummaryrefslogtreecommitdiff
path: root/tests/Tests
diff options
context:
space:
mode:
authorAlbert Krewinkel <tarleb@moltkeplatz.de>2014-05-10 11:25:20 +0200
committerAlbert Krewinkel <tarleb@moltkeplatz.de>2014-05-10 11:35:54 +0200
commitc5fd631b550a3b05b60de1684c80387bc46a88cc (patch)
tree7364ec918ae1f45ac050ad03b554e76f29d90fd0 /tests/Tests
parent884693fea8d2721746c27f370835608d5242fed9 (diff)
downloadpandoc-c5fd631b550a3b05b60de1684c80387bc46a88cc.tar.gz
Org reader: Fix block parameter reader, relax constraints
The reader produced wrong results for block containing non-letter chars in their parameter arguments. This patch relaxes constraints in that it allows block header arguments to contain any non-space character (except for ']' for inline blocks). Thanks to Xiao Hanyu for noticing this.
Diffstat (limited to 'tests/Tests')
-rw-r--r--tests/Tests/Readers/Org.hs12
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/Tests/Readers/Org.hs b/tests/Tests/Readers/Org.hs
index 87b0d0c90..4ef7a7731 100644
--- a/tests/Tests/Readers/Org.hs
+++ b/tests/Tests/Readers/Org.hs
@@ -929,5 +929,17 @@ tests =
, "#+end_html"
] =?>
rawBlock "html" "\n<span>boring</span>\n\n"
+
+ , "Non-letter chars in source block parameters" =:
+ unlines [ "#+BEGIN_SRC C :tangle xxxx.c :city Zürich"
+ , "code body"
+ , "#+END_SRC"
+ ] =?>
+ let classes = [ "c", "rundoc-block" ]
+ params = [ ("rundoc-language", "C")
+ , ("rundoc-tangle", "xxxx.c")
+ , ("rundoc-city", "Zürich")
+ ]
+ in codeBlockWith ( "", classes, params) "code body\n"
]
]