diff options
author | John MacFarlane <jgm@berkeley.edu> | 2013-08-02 15:37:09 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2013-08-02 15:37:09 -0700 |
commit | a32417378e8023b5dd8af4d8a9ea66eddb99a0eb (patch) | |
tree | e055476110f2ce1f1e1fc1451565b469505bc23d | |
parent | dceffeb04370e8661dd0534a6e97fd15caaeddcf (diff) | |
download | pandoc-a32417378e8023b5dd8af4d8a9ea66eddb99a0eb.tar.gz |
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).
-rw-r--r-- | src/Text/Pandoc/Biblio.hs | 5 |
1 files changed, 3 insertions, 2 deletions
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) = |