parent
988d381aad
commit
eb3307da4e
2 changed files with 38 additions and 2 deletions
|
@ -61,7 +61,8 @@ readBibtexString :: Variant -- ^ bibtex or biblatex
|
|||
readBibtexString variant locale idpred contents = do
|
||||
case runParser (((resolveCrossRefs variant <$> bibEntries) <* eof) >>=
|
||||
mapM (itemToReference locale variant) .
|
||||
filter (idpred . identifier))
|
||||
filter (\item -> idpred (identifier item) &&
|
||||
entryType item /= "xdata"))
|
||||
(fromMaybe defaultLang $ localeLanguage locale, Map.empty)
|
||||
"" contents of
|
||||
Left err -> Left err
|
||||
|
@ -1058,7 +1059,6 @@ getTypeAndGenre :: Bib (Text, Maybe Text)
|
|||
getTypeAndGenre = do
|
||||
lang <- gets localeLang
|
||||
et <- asks entryType
|
||||
guard $ et /= "xdata"
|
||||
reftype' <- resolveKey' lang <$> getRawField "type"
|
||||
<|> return mempty
|
||||
st <- getRawField "entrysubtype" <|> return mempty
|
||||
|
|
36
test/command/6752.md
Normal file
36
test/command/6752.md
Normal file
|
@ -0,0 +1,36 @@
|
|||
```
|
||||
% pandoc -f biblatex -t csljson
|
||||
@xdata{XDPubAlfredAKnopf,
|
||||
publisher = {Alfred A.~Knopf},
|
||||
address = {New York, NY}
|
||||
}
|
||||
@book{Klinkenborg2012,
|
||||
author = {Verlyn Klinkenborg},
|
||||
title = {Several short sentences about writing},
|
||||
date = {2012},
|
||||
xdata = {XDPubAlfredAKnopf},
|
||||
}
|
||||
^D
|
||||
[
|
||||
{
|
||||
"author": [
|
||||
{
|
||||
"family": "Klinkenborg",
|
||||
"given": "Verlyn"
|
||||
}
|
||||
],
|
||||
"id": "Klinkenborg2012",
|
||||
"issued": {
|
||||
"date-parts": [
|
||||
[
|
||||
2012
|
||||
]
|
||||
]
|
||||
},
|
||||
"publisher": "Alfred A. Knopf",
|
||||
"publisher-place": "New York, NY",
|
||||
"title": "Several short sentences about writing",
|
||||
"type": "book"
|
||||
}
|
||||
]
|
||||
```
|
Loading…
Add table
Reference in a new issue