From a32417378e8023b5dd8af4d8a9ea66eddb99a0eb Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 2 Aug 2013 15:37:09 -0700 Subject: Biblio: Don't interfere with Notes that aren't citation notes. Closes #898: notes not generated from citations were being adjusted (first letter capitalized, for example, against author's intentions). --- src/Text/Pandoc/Biblio.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Text/Pandoc/Biblio.hs') diff --git a/src/Text/Pandoc/Biblio.hs b/src/Text/Pandoc/Biblio.hs index 31c55472e..d0db35ae7 100644 --- a/src/Text/Pandoc/Biblio.hs +++ b/src/Text/Pandoc/Biblio.hs @@ -53,7 +53,7 @@ processBiblio (Just style) r p = map (map toCslCite) grps) cits_map = M.fromList $ zip grps (citations result) biblioList = map (renderPandoc' style) (bibliography result) - Pandoc m b = bottomUp mvPunct . deNote . bottomUp (processCite style cits_map) $ p' + Pandoc m b = bottomUp mvPunct . deNote . topDown (processCite style cits_map) $ p' in Pandoc m $ b ++ biblioList -- | Substitute 'Cite' elements with formatted citations. @@ -103,7 +103,8 @@ endWithPunct xs@(_:_) = case reverse (stringify [last xs]) of deNote :: Pandoc -> Pandoc deNote = topDown go - where go (Note [Para xs]) = Note $ bottomUp go' [Para $ sanitize xs] + where go (Cite cs [Note [Para xs]]) = + Cite cs [Note $ bottomUp go' [Para $ sanitize xs]] go (Note xs) = Note $ bottomUp go' xs go x = x go' (Note [Para xs]:ys) = -- cgit v1.2.3