diff options
author | John MacFarlane <jgm@berkeley.edu> | 2010-11-16 07:15:30 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2010-11-16 07:15:30 -0800 |
commit | d73a531d899600ab9999b798129dc0fa6185ef7f (patch) | |
tree | f06620b2e219e95b40419ac1e0657a40c73bce20 /src/Text/Pandoc | |
parent | b158ae21a21d8e8c2ca13ea2b89ea4f1c8bb5cdd (diff) | |
download | pandoc-d73a531d899600ab9999b798129dc0fa6185ef7f.tar.gz |
Biblio: don't add footnote if empty.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Biblio.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Text/Pandoc/Biblio.hs b/src/Text/Pandoc/Biblio.hs index bca24d815..05cc296c1 100644 --- a/src/Text/Pandoc/Biblio.hs +++ b/src/Text/Pandoc/Biblio.hs @@ -65,11 +65,11 @@ processCite s cs (i:is) | Cite t _ <- i = process t ++ processCite s cs is | otherwise = i : processCite s cs is where + addNt t x = if null x then [] else [Cite t $ renderPandoc s x] process t = case M.lookup t cs of Just x -> if isTextualCitation t && x /= [] - then renderPandoc s [head x] ++ [Space] ++ - [Cite t $ renderPandoc s $ tail x] - else [Cite t $ renderPandoc s x] + then renderPandoc s [head x] ++ [Space] ++ addNt t (tail x) + else [Cite t $ renderPandoc s x] Nothing -> [Str ("Error processing " ++ show t)] isTextualCitation :: [Citation] -> Bool |