Fixed cite key parsing regression.

We were capturing final colons as in [@foo: bar];
the citation id was being parsed as "@foo:".

Closes jgm/pandoc-citeproc#201.
This commit is contained in:
John MacFarlane 2015-12-12 00:27:08 -08:00
parent 1b0e0998fa
commit 28a2f4c2a4

View file

@ -1213,7 +1213,7 @@ citeKey = try $ do
let regchar = satisfy (\c -> isAlphaNum c || c == '_')
let internal p = try $ p <* lookAhead regchar
rest <- many $ regchar <|> internal (oneOf ":.#$%&-+?<>~/") <|>
(oneOf ":/" <* lookAhead (char '/'))
try (oneOf ":/" <* lookAhead (char '/'))
let key = firstChar:rest
return (suppress_author, key)