aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Biblio.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/Text/Pandoc/Biblio.hs b/src/Text/Pandoc/Biblio.hs
index 1554d1861..4dd82dd08 100644
--- a/src/Text/Pandoc/Biblio.hs
+++ b/src/Text/Pandoc/Biblio.hs
@@ -53,9 +53,8 @@ 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 (processCite style cits_map) p'
- b' = bottomUp mvPunct $ deNote b
- in Pandoc m $ b' ++ biblioList
+ Pandoc m b = bottomUp mvPunct . deNote . bottomUp (processCite style cits_map) $ p'
+ in Pandoc m $ b ++ biblioList
-- | Substitute 'Cite' elements with formatted citations.
processCite :: Style -> M.Map [Citation] [FormattedOutput] -> Inline -> Inline
@@ -89,7 +88,7 @@ sanitize :: [Inline] -> [Inline]
sanitize xs | endWithPunct xs = toCapital xs
| otherwise = toCapital (xs ++ [Str "."])
-deNote :: [Block] -> [Block]
+deNote :: Pandoc -> Pandoc
deNote = topDown go
where go (Note [Para xs]) = Note $ bottomUp go' [Para $ sanitize xs]
go (Note xs) = Note $ bottomUp go' xs