aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Citeproc.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Citeproc.hs b/src/Text/Pandoc/Citeproc.hs
index 71331a4a2..66b1cf74f 100644
--- a/src/Text/Pandoc/Citeproc.hs
+++ b/src/Text/Pandoc/Citeproc.hs
@@ -165,7 +165,10 @@ insertSpace ils =
case Seq.lookup 0 rest of
Just (Span ("",["csl-right-inline"],[]) _) ->
Many $
- Span ("",["csl-left-margin"],[]) (xs ++ [Space]) Seq.<| rest
+ Span ("",["csl-left-margin"],[]) (xs ++ case lastMay xs of
+ Just Space -> []
+ _ -> [Space])
+ Seq.<| rest
_ -> ils
_ -> ils