git.iko.soy/typeable/pandoc
on master help sign in
Biblio: don't add footnote if empty.
commitd73a531d899600ab9999b798129dc0fa6185ef7f authorJohn MacFarlane <jgm@berkeley.edu> dateTue 16 Nov 2010, 07:15 (16 years ago) parentb158ae2
1 file changed+3−3
src/Text/Pandoc/Biblio.hs+3−3
src/Text/Pandoc/Biblio.hs+3−3
@@ -65,11 +65,11 @@ processCite s cs (i:is)
6565 | Cite t _ <- i = process t ++ processCite s cs is
6666 | otherwise = i : processCite s cs is
6767 where
68+ addNt t x = if null x then [] else [Cite t $ renderPandoc s x]
6869 process t = case M.lookup t cs of
6970 Just x -> if isTextualCitation t && x /= []
70− then renderPandoc s [head x] ++ [Space] ++
71− [Cite t $ renderPandoc s $ tail x]
72− else [Cite t $ renderPandoc s x]
71+ then renderPandoc s [head x] ++ [Space] ++ addNt t (tail x)
72+ else [Cite t $ renderPandoc s x]
7373 Nothing -> [Str ("Error processing " ++ show t)]
7474
7575isTextualCitation :: [Citation] -> Bool