Slight improvement to last commit.

We now add a space only if there isn't already one.
(Some styles add a space at the end of the left-margin
div.)
This commit is contained in:
John MacFarlane 2020-09-24 10:03:04 -07:00
parent 810ea6fdf8
commit a331c69b49

View file

@ -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