aboutsummaryrefslogtreecommitdiff
path: root/tests/Tests
diff options
context:
space:
mode:
authorMatthias C. M. Troffaes <matthias.troffaes@gmail.com>2015-02-18 13:54:25 +0000
committerMatthias C. M. Troffaes <matthias.troffaes@gmail.com>2015-02-18 15:30:17 +0000
commitdccd408a9c22e9120dcf50f1c107bff71778ee45 (patch)
tree5444aad6551194a0bb34a60d83d369b9e5024fac /tests/Tests
parent3480189e8e3edce51351629444e5ed0db2c21eef (diff)
downloadpandoc-dccd408a9c22e9120dcf50f1c107bff71778ee45.tar.gz
Allow digit as first character of a citation key.
* Update parser to recognize citation keys starting with a digit. * Update documentation accordingly. * Test case added. See https://github.com/jgm/pandoc-citeproc/issues/97
Diffstat (limited to 'tests/Tests')
-rw-r--r--tests/Tests/Readers/Markdown.hs22
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/Tests/Readers/Markdown.hs b/tests/Tests/Readers/Markdown.hs
index fdb1a7417..b8d118d78 100644
--- a/tests/Tests/Readers/Markdown.hs
+++ b/tests/Tests/Readers/Markdown.hs
@@ -289,4 +289,26 @@ tests = [ testGroup "inline code"
, plain "b"
, plain "c" <> bulletList [plain "d"] ]
]
+ , testGroup "citations"
+ [ "simple" =:
+ "@item1" =?> para (cite [
+ Citation{ citationId = "item1"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = AuthorInText
+ , citationNoteNum = 0
+ , citationHash = 0
+ }
+ ] "@item1")
+ , "key starts with digit" =:
+ "@1657:huyghens" =?> para (cite [
+ Citation{ citationId = "1657:huyghens"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = AuthorInText
+ , citationNoteNum = 0
+ , citationHash = 0
+ }
+ ] "@1657:huyghens")
+ ]
]