aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2021-06-12 10:16:44 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2021-06-12 10:16:44 -0700
commitb0cd6c622494666add6bdd7674ec5b7791bc83d0 (patch)
tree981df4f298c84a4eaf2e52237ef0548474f70444 /src/Text
parentea88979aa2ea4b41463216f00d9769d7c11f90fc (diff)
downloadpandoc-b0cd6c622494666add6bdd7674ec5b7791bc83d0.tar.gz
Fix regression in citeproc processing.
If inline references are used (in the metadata `references` field), we should still only include in the bibliography items that are actually cited -- unless `nocite` is used. Closes #7376.
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Citeproc.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Citeproc.hs b/src/Text/Pandoc/Citeproc.hs
index ad3b26c0f..a5b26c9b4 100644
--- a/src/Text/Pandoc/Citeproc.hs
+++ b/src/Text/Pandoc/Citeproc.hs
@@ -194,7 +194,9 @@ getReferences mblocale (Pandoc meta bs) = do
then const True
else (`Set.member` citeIds)
let inlineRefs = case lookupMeta "references" meta of
- Just (MetaList rs) -> mapMaybe metaValueToReference rs
+ Just (MetaList rs) ->
+ filter (idpred . unItemId . referenceId)
+ $ mapMaybe metaValueToReference rs
_ -> []
externalRefs <- case lookupMeta "bibliography" meta of
Just (MetaList xs) ->