git.iko.soy/typeable/pandoc
on master help sign in
Use new citeproc; do note capitalization here, not in citeproc.
commit3e6d009c6b33f25dea2ff1cb13298dfa3ec0bddd authorJohn MacFarlane <jgm@berkeley.edu> dateThu 29 Oct 2020, 21:53 (6 years ago) parentbc3f16b
5 files changed+16−7
cabal.project+1−1 src/Text/Pandoc/Citeproc.hs+11−2 stack.yaml+1−1 test/command/pandoc-citeproc-chicago-fullnote-bibliography.md+1−1 test/command/pandoc-citeproc-locators-integrated.md+2−2
cabal.project+1−1
@@ -7,5 +7,5 @@ package pandoc
77source-repository-package
88 type: git
99 location: https://github.com/jgm/citeproc
10− tag: ac57c6ceb8fe6583921c5e3f3a3838401191b97c
10+ tag: 3bff6aff18a99b710b25949d039d221f36c3a77c
1111
src/Text/Pandoc/Citeproc.hs+11−2
@@ -163,8 +163,10 @@ processCitations (Pandoc meta bs) = do
163163 _ -> id
164164
165165 let Pandoc meta'' bs' =
166− maybe id (setMeta "nocite") metanocites $
167− walk (fixQuotes . mvPunct moveNotes locale) $ walk deNote $
166+ maybe id (setMeta "nocite") metanocites .
167+ walk (map capitalizeNoteCitation .
168+ fixQuotes . mvPunct moveNotes locale) .
169+ walk deNote .
168170 evalState (walkM insertResolvedCitations $ Pandoc meta' bs)
169171 $ cits
170172 return $ Pandoc meta''
@@ -515,6 +517,13 @@ extractText (FancyVal x) = toText x
515517extractText (NumVal n) = T.pack (show n)
516518extractText _ = mempty
517519
520+capitalizeNoteCitation :: Inline -> Inline
521+capitalizeNoteCitation (Cite cs [Note [Para ils]]) =
522+ Cite cs
523+ [Note [Para $ B.toList $ addTextCase Nothing CapitalizeFirst
524+ $ B.fromList ils]]
525+capitalizeNoteCitation x = x
526+
518527deNote :: Inline -> Inline
519528deNote (Note bs) = Note $ walk go bs
520529 where
stack.yaml+1−1
@@ -23,7 +23,7 @@ extra-deps:
2323- commonmark-extensions-0.2.0.1
2424- commonmark-pandoc-0.2.0.1
2525- git: https://github.com/jgm/citeproc
26− commit: ac57c6ceb8fe6583921c5e3f3a3838401191b97c
26+ commit: 3bff6aff18a99b710b25949d039d221f36c3a77c
2727
2828ghc-options:
2929 "$locals": -fhide-source-paths -Wno-missing-home-modules
test/command/pandoc-citeproc-chicago-fullnote-bibliography.md+1−1
@@ -123,7 +123,7 @@ Sam Smith. Oxford: Oxford University Press, 2007.
123123
124124[^9]: See [Doe, *First Book*, 2005, 34--35](#ref-item1).
125125
126−[^10]: Some citations (See [Doe, chap. 3](#ref-item1); [Doe and Roe,
126+[^10]: Some citations (see [Doe, chap. 3](#ref-item1); [Doe and Roe,
127127 "Why Water Is Wet"](#ref-пункт3); [Doe, "Article,"
128128 2006](#ref-item2)).
129129
test/command/pandoc-citeproc-locators-integrated.md+2−2
@@ -29,7 +29,7 @@ See <https://github.com/jgm/pandoc-citeproc/pull/362>.
2929
3030[@citekey, p. \[89\]]
3131
32−[@citekey and nothing else].
32+[@citekey and nothing else]
3333
3434[@citekey, 123(4)\[5\]6, and suffix]
3535
@@ -79,7 +79,7 @@ See <https://github.com/jgm/pandoc-citeproc/pull/362>.
7979
8080[^9]
8181
82−.[^10]
82+[^10]
8383
8484[^11]
8585