Allow :// in citation keys.

Closes jgm/pandoc-citeproc#166.
This commit is contained in:
John MacFarlane 2015-11-13 11:00:56 -08:00
parent a119ad8d09
commit d8080db7f7

View file

@ -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)