aboutsummaryrefslogtreecommitdiff
path: root/tests/Tests/Readers
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-04-17 19:10:37 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2015-04-17 19:10:37 -0700
commit28ca8566ab72e135d559e457e28d3f3f306a7b0e (patch)
treeced14587477a16e1fbe0865f4e6c40342572d46f /tests/Tests/Readers
parent44fcc5f96e3f412337a98a1791a79b059579f78e (diff)
parentdccd408a9c22e9120dcf50f1c107bff71778ee45 (diff)
downloadpandoc-28ca8566ab72e135d559e457e28d3f3f306a7b0e.tar.gz
Merge pull request #1954 from mcmtroffaes/feature/citekey-firstchar-alphanum
Allow digit as first character of a citation key.
Diffstat (limited to 'tests/Tests/Readers')
-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 6c8e9f306..1cc00fd5e 100644
--- a/tests/Tests/Readers/Markdown.hs
+++ b/tests/Tests/Readers/Markdown.hs
@@ -293,4 +293,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")
+ ]
]