git.iko.soy/typeable/pandoc
on master help sign in
Fixed spacing bug for reference-style citations.
b10e82cJohn MacFarlane
src/Text/Pandoc/Biblio.hs+4−1
@@ -71,7 +71,10 @@ processCite s cs (i:is)
71 addNt t x = if null x then [] else [Cite t $ renderPandoc s x]
71 addNt t x = if null x then [] else [Cite t $ renderPandoc s x]
72 process t = case M.lookup t cs of
72 process t = case M.lookup t cs of
73 Just x -> if isTextualCitation t && x /= []
73 Just x -> if isTextualCitation t && x /= []
74− then renderPandoc s [head x] ++ [Space] ++ addNt t (tail x)
74+ then renderPandoc s [head x] ++
75+ if tail x /= []
76+ then Space : addNt t (tail x)
77+ else []
75 else [Cite t $ renderPandoc s x]
78 else [Cite t $ renderPandoc s x]
76 Nothing -> [Str ("Error processing " ++ show t)]
79 Nothing -> [Str ("Error processing " ++ show t)]
77
80
tests/markdown-citations.ieee.html+1−1
@@ -53,4 +53,4 @@
53 ></li
53 ></li
54 ></ol
54 ></ol
55 ></div
55 ></div
56−>
56+>