From dccd408a9c22e9120dcf50f1c107bff71778ee45 Mon Sep 17 00:00:00 2001 From: "Matthias C. M. Troffaes" Date: Wed, 18 Feb 2015 13:54:25 +0000 Subject: 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 --- tests/Tests/Readers/Markdown.hs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'tests/Tests/Readers/Markdown.hs') 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") + ] ] -- cgit v1.2.3