From 914cf0b602f0585cfd1b401b956c8edfd129d47d Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 16 Dec 2020 15:37:40 -0800 Subject: Fix citeproc regression with duplicate references. - Use dev version of citeproc, which handles duplicate ids better, preferring the last one in the list and discarding the rest. - Ensure that inline citations take priority over external ones. See jgm/citeproc#36. This restores the behavior of pandoc-citeproc. --- src/Text/Pandoc/Citeproc.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/Text/Pandoc/Citeproc.hs b/src/Text/Pandoc/Citeproc.hs index 770d571a6..ca1ab9f96 100644 --- a/src/Text/Pandoc/Citeproc.hs +++ b/src/Text/Pandoc/Citeproc.hs @@ -119,7 +119,8 @@ processCitations (Pandoc meta bs) = do Nothing -> return [] Nothing -> return [] let refs = map (linkifyVariables . legacyDateRanges) - (inlineRefs ++ externalRefs) + (externalRefs ++ inlineRefs) + -- note that inlineRefs can override externalRefs let otherIdsMap = foldr (\ref m -> case T.words . extractText <$> M.lookup "other-ids" -- cgit v1.2.3