aboutsummaryrefslogtreecommitdiff
path: root/test/Tests/Readers/Markdown.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2017-11-20 16:48:43 -0800
committerJohn MacFarlane <[email protected]>2017-11-20 16:48:43 -0800
commit04d9b9b6df55af0f64f8669f5b352b573d8ebcba (patch)
treee31b8d97ef75ad2902580a40905b2302256bb8c3 /test/Tests/Readers/Markdown.hs
parent35ced1621df6b1dfe7de79e994343a539b624d8d (diff)
Allow URI as cite key.uri-cite-key
This affects Markdown and Org with `+citations`. Note that we had to constrain the type of the `citeKey` parser in `Text.Pandoc.Parsing` to accept `[Char]` instead of arbitrary streams.
Diffstat (limited to 'test/Tests/Readers/Markdown.hs')
-rw-r--r--test/Tests/Readers/Markdown.hs10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/Tests/Readers/Markdown.hs b/test/Tests/Readers/Markdown.hs
index 1cd32b87d..393b0baa4 100644
--- a/test/Tests/Readers/Markdown.hs
+++ b/test/Tests/Readers/Markdown.hs
@@ -417,6 +417,16 @@ tests = [ testGroup "inline code"
, citationHash = 0
}
] "@1657:huyghens")
+ , "key is URI" =:
+ "@https://example.com/cgi-bin/ubb/forumdisplay.cgi?action=topics&number=527" =?> para (cite [
+ Citation{ citationId = "https://example.com/cgi-bin/ubb/forumdisplay.cgi?action=topics&number=527"
+ , citationPrefix = []
+ , citationSuffix = []
+ , citationMode = AuthorInText
+ , citationNoteNum = 0
+ , citationHash = 0
+ }
+ ] "@https://example.com/cgi-bin/ubb/forumdisplay.cgi?action=topics&number=527")
]
, let citation = cite [Citation "cita" [] [] AuthorInText 0 0] (str "@cita")
in testGroup "footnote/link following citation" -- issue #2083