aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2020-10-15 17:41:13 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2020-10-15 17:41:45 -0700
commiteb3307da4e53097da52997e276c08b188ed40960 (patch)
tree7b28e8ea2c64be6999f34ae10209b4c45954ab6f /src/Text/Pandoc
parent988d381aad150431f1b8b46349526fb5379e0fa0 (diff)
downloadpandoc-eb3307da4e53097da52997e276c08b188ed40960.tar.gz
Fix handling of xdata in bibtex/biblatex bibliographies.
Closes #6752.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r--src/Text/Pandoc/Citeproc/BibTeX.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/Citeproc/BibTeX.hs b/src/Text/Pandoc/Citeproc/BibTeX.hs
index 4828115b6..b24ad0319 100644
--- a/src/Text/Pandoc/Citeproc/BibTeX.hs
+++ b/src/Text/Pandoc/Citeproc/BibTeX.hs
@@ -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