From d8080db7f7213b7afa8bd87952771dfe1d3f89ec Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 13 Nov 2015 11:00:56 -0800 Subject: [PATCH] Allow `://` in citation keys. Closes jgm/pandoc-citeproc#166. --- src/Text/Pandoc/Parsing.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs index c64860ad9e11..02d114e0ffeb 100644 --- a/src/Text/Pandoc/Parsing.hs +++ b/src/Text/Pandoc/Parsing.hs @@ -1211,7 +1211,8 @@ citeKey = try $ do firstChar <- alphaNum <|> char '_' <|> char '*' -- @* for wildcard in nocite let regchar = satisfy (\c -> isAlphaNum c || c == '_') let internal p = try $ p <* lookAhead regchar - rest <- many $ regchar <|> internal (oneOf ":.#$%&-+?<>~/") + rest <- many $ regchar <|> internal (oneOf ":.#$%&-+?<>~/") <|> + (oneOf ":/" <* lookAhead (char '/')) let key = firstChar:rest return (suppress_author, key)