git.iko.soy/typeable/pandoc
on master help sign in
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.

commit914cf0b602f0585cfd1b401b956c8edfd129d47d authorJohn MacFarlane <jgm@berkeley.edu> dateWed 16 Dec 2020, 15:37 (6 years ago) parent41577a6
4 files changed+11−10
cabal.project+4−4 pandoc.cabal+1−1 src/Text/Pandoc/Citeproc.hs+2−1 stack.yaml+4−4
cabal.project+4−4
@@ -9,8 +9,8 @@ source-repository-package
99 location: https://github.com/jgm/doctemplates.git
1010 tag: 7ccbf7df16edbc7c5d835d955b242c61fd4e6601
1111
12−-- source-repository-package
13−-- type: git
14−-- location: https://github.com/jgm/citeproc
15−-- tag: 42b1d154b02435229acbe98ae0f17d01b757ee93
12+source-repository-package
13+ type: git
14+ location: https://github.com/jgm/citeproc
15+ tag: a8193fe375fa2354049bf9a967ba3bad4b1ba053
1616
pandoc.cabal+1−1
@@ -400,7 +400,7 @@ library
400400 blaze-markup >= 0.8 && < 0.9,
401401 bytestring >= 0.9 && < 0.12,
402402 case-insensitive >= 1.2 && < 1.3,
403− citeproc >= 0.2.0.1 && < 0.3,
403+ citeproc >= 0.3 && < 0.4,
404404 commonmark >= 0.1.1.2 && < 0.2,
405405 commonmark-extensions >= 0.2.0.4 && < 0.3,
406406 commonmark-pandoc >= 0.2 && < 0.3,
src/Text/Pandoc/Citeproc.hs+2−1
@@ -119,7 +119,8 @@ processCitations (Pandoc meta bs) = do
119119 Nothing -> return []
120120 Nothing -> return []
121121 let refs = map (linkifyVariables . legacyDateRanges)
122− (inlineRefs ++ externalRefs)
122+ (externalRefs ++ inlineRefs)
123+ -- note that inlineRefs can override externalRefs
123124 let otherIdsMap = foldr (\ref m ->
124125 case T.words . extractText <$>
125126 M.lookup "other-ids"
stack.yaml+4−4
@@ -20,10 +20,10 @@ extra-deps:
2020- doctemplates:
2121 git: https://github.com/jgm/doctemplates.git
2222 commit: 7ccbf7df16edbc7c5d835d955b242c61fd4e6601
23−- citeproc-0.2.0.1
24−# - citeproc:
25−# git: https://github.com/jgm/citeproc.git
26−# commit: 42b1d154b02435229acbe98ae0f17d01b757ee93
23+# - citeproc-0.2.0.1
24+- citeproc:
25+ git: https://github.com/jgm/citeproc.git
26+ commit: a8193fe375fa2354049bf9a967ba3bad4b1ba053
2727ghc-options:
2828 "$locals": -fhide-source-paths -Wno-missing-home-modules
2929resolver: lts-16.23