diff options
author | Matthias C. M. Troffaes <matthias.troffaes@gmail.com> | 2015-02-18 13:54:25 +0000 |
---|---|---|
committer | Matthias C. M. Troffaes <matthias.troffaes@gmail.com> | 2015-02-18 15:30:17 +0000 |
commit | dccd408a9c22e9120dcf50f1c107bff71778ee45 (patch) | |
tree | 5444aad6551194a0bb34a60d83d369b9e5024fac /src/Text/Pandoc | |
parent | 3480189e8e3edce51351629444e5ed0db2c21eef (diff) | |
download | pandoc-dccd408a9c22e9120dcf50f1c107bff71778ee45.tar.gz |
Allow digit as first character of a citation key.
* Update parser to recognize citation keys starting with a digit.
* Update documentation accordingly.
* Test case added.
See https://github.com/jgm/pandoc-citeproc/issues/97
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Parsing.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Parsing.hs b/src/Text/Pandoc/Parsing.hs index 28ea2bd2f..facf4d3b9 100644 --- a/src/Text/Pandoc/Parsing.hs +++ b/src/Text/Pandoc/Parsing.hs @@ -1212,7 +1212,7 @@ citeKey = try $ do guard =<< notAfterString suppress_author <- option False (char '-' *> return True) char '@' - firstChar <- letter <|> char '_' + firstChar <- alphaNum <|> char '_' let regchar = satisfy (\c -> isAlphaNum c || c == '_') let internal p = try $ p <* lookAhead regchar rest <- many $ regchar <|> internal (oneOf ":.#$%&-+?<>~/") |