Check biblio for all citations, not just textual.
This commit is contained in:
parent
3c7c1d8574
commit
b48fa0ea59
1 changed files with 5 additions and 5 deletions
|
@ -1332,9 +1332,6 @@ noneOfUnlessEscaped cs =
|
||||||
textualCite :: GenParser Char ParserState [Citation]
|
textualCite :: GenParser Char ParserState [Citation]
|
||||||
textualCite = try $ do
|
textualCite = try $ do
|
||||||
(_, key) <- citeKey
|
(_, key) <- citeKey
|
||||||
st <- getState
|
|
||||||
unless (key `elem` stateCitations st) $
|
|
||||||
fail "not a citation"
|
|
||||||
let first = Citation{ citationId = key
|
let first = Citation{ citationId = key
|
||||||
, citationPrefix = []
|
, citationPrefix = []
|
||||||
, citationSuffix = []
|
, citationSuffix = []
|
||||||
|
@ -1368,13 +1365,16 @@ normalCite = try $ do
|
||||||
char ']'
|
char ']'
|
||||||
return citations
|
return citations
|
||||||
|
|
||||||
citeKey :: GenParser Char st (Bool, String)
|
citeKey :: GenParser Char ParserState (Bool, String)
|
||||||
citeKey = try $ do
|
citeKey = try $ do
|
||||||
suppress_author <- option False (char '-' >> return True)
|
suppress_author <- option False (char '-' >> return True)
|
||||||
char '@'
|
char '@'
|
||||||
first <- letter
|
first <- letter
|
||||||
rest <- many $ (noneOf ",;]@ \t\n")
|
rest <- many $ (noneOf ",;]@ \t\n")
|
||||||
return (suppress_author, first:rest)
|
let key = first:rest
|
||||||
|
st <- getState
|
||||||
|
guard $ key `elem` stateCitations st
|
||||||
|
return (suppress_author, key)
|
||||||
|
|
||||||
locator :: GenParser Char st String
|
locator :: GenParser Char st String
|
||||||
locator = try $ do
|
locator = try $ do
|
||||||
|
|
Loading…
Add table
Reference in a new issue