aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Biblio.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Biblio.hs b/src/Text/Pandoc/Biblio.hs
index efaafd77d..0241b2d6d 100644
--- a/src/Text/Pandoc/Biblio.hs
+++ b/src/Text/Pandoc/Biblio.hs
@@ -71,7 +71,10 @@ processCite s cs (i:is)
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] ++ addNt t (tail x)
+ then renderPandoc s [head x] ++
+ if tail x /= []
+ then Space : addNt t (tail x)
+ else []
else [Cite t $ renderPandoc s x]
Nothing -> [Str ("Error processing " ++ show t)]