aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-12-12 00:27:08 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-12-12 00:27:08 -0800
commit28a2f4c2a4aea172c370e91fdb01471245ba9a86 (patch)
treee93582f281448401e70183e8d09c78b8abdc3ce0
parent1b0e0998fafcfad1ad2c83aa435a8f2a32faa2cd (diff)
downloadpandoc-28a2f4c2a4aea172c370e91fdb01471245ba9a86.tar.gz
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.
-rw-r--r--src/Text/Pandoc/Parsing.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs
index c79c8fffc..85786eb3e 100644
--- a/src/Text/Pandoc/Parsing.hs
+++ b/src/Text/Pandoc/Parsing.hs
@@ -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)