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

commita32417378e8023b5dd8af4d8a9ea66eddb99a0eb authorJohn MacFarlane <jgm@berkeley.edu> dateFri 2 Aug 2013, 15:37 (13 years ago) parentdceffeb
1 file changed+3−2
src/Text/Pandoc/Biblio.hs+3−2
src/Text/Pandoc/Biblio.hs+3−2
@@ -53,7 +53,7 @@ processBiblio (Just style) r p =
5353 map (map toCslCite) grps)
5454 cits_map = M.fromList $ zip grps (citations result)
5555 biblioList = map (renderPandoc' style) (bibliography result)
56− Pandoc m b = bottomUp mvPunct . deNote . bottomUp (processCite style cits_map) $ p'
56+ Pandoc m b = bottomUp mvPunct . deNote . topDown (processCite style cits_map) $ p'
5757 in Pandoc m $ b ++ biblioList
5858
5959-- | Substitute 'Cite' elements with formatted citations.
@@ -103,7 +103,8 @@ endWithPunct xs@(_:_) = case reverse (stringify [last xs]) of
103103
104104deNote :: Pandoc -> Pandoc
105105deNote = topDown go
106− where go (Note [Para xs]) = Note $ bottomUp go' [Para $ sanitize xs]
106+ where go (Cite cs [Note [Para xs]]) =
107+ Cite cs [Note $ bottomUp go' [Para $ sanitize xs]]
107108 go (Note xs) = Note $ bottomUp go' xs
108109 go x = x
109110 go' (Note [Para xs]:ys) =