@@ -94,6 +94,7 @@ module Text.Pandoc.Parsing ( (>>~),
94 apostrophe,
94 apostrophe,
98 applyMacros',
99 applyMacros',
@@ -1144,6 +1145,18 @@ nested p = do
1144 updateState $ \st -> st{ stateMaxNestingLevel = nestlevel }
1145 updateState $ \st -> st{ stateMaxNestingLevel = nestlevel }
1145 return res
1146 return res
1148+citeKey :: HasLastStrPosition st => Parser [Char] st (Bool, String)
1150+ guard =<< notAfterString
1151+ suppress_author <- option False (char '-' *> return True)
1153+ firstChar <- letter <|> char '_'
1154+ let regchar = satisfy (\c -> isAlphaNum c || c == '_')
1155+ let internal p = try $ p <* lookAhead regchar
1156+ rest <- many $ regchar <|> internal (oneOf ":.#$%&-+?<>~/")
1157+ let key = firstChar:rest
1158+ return (suppress_author, key)
1148-- Macros
1161-- Macros