@@ -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) =