aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Citeproc.hs4
-rw-r--r--test/command/7376.md16
-rw-r--r--test/command/pandoc-citeproc-356.md9
3 files changed, 21 insertions, 8 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) ->
diff --git a/test/command/7376.md b/test/command/7376.md
new file mode 100644
index 000000000..229c61cfb
--- /dev/null
+++ b/test/command/7376.md
@@ -0,0 +1,16 @@
+```
+% pandoc --citeproc -t plain
+---
+references:
+- id: item1
+ type: book
+ author:
+ - family: Doe
+ given: Jane
+ issued: 2020
+ title: The title
+...
+^D
+
+
+```
diff --git a/test/command/pandoc-citeproc-356.md b/test/command/pandoc-citeproc-356.md
index 4463ef63f..b4f998dae 100644
--- a/test/command/pandoc-citeproc-356.md
+++ b/test/command/pandoc-citeproc-356.md
@@ -15,11 +15,6 @@ references:
[@bar]
^D
-(Alice 2042)
-
-::: {#refs .references .csl-bib-body .hanging-indent}
-::: {#ref-foo .csl-entry}
-Alice. 2042.
-:::
-:::
+[WARNING] Citeproc: citation bar not found
+(**bar?**)
```