diff options
author | John MacFarlane <jgm@berkeley.edu> | 2010-11-28 07:55:33 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2010-11-28 07:55:33 -0800 |
commit | b10e82c9fa9a2284a3eb9ff3bc1334ed15d45a26 (patch) | |
tree | 987eca4fa0ba0449bd5f7de2744dc72a835914fc | |
parent | e2e107cbeda11b88f9477003a89802b9eb654a09 (diff) | |
download | pandoc-b10e82c9fa9a2284a3eb9ff3bc1334ed15d45a26.tar.gz |
Fixed spacing bug for reference-style citations.
-rw-r--r-- | src/Text/Pandoc/Biblio.hs | 5 | ||||
-rw-r--r-- | tests/markdown-citations.ieee.html | 2 |
2 files changed, 5 insertions, 2 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)] diff --git a/tests/markdown-citations.ieee.html b/tests/markdown-citations.ieee.html index bf8955940..d25a60ca0 100644 --- a/tests/markdown-citations.ieee.html +++ b/tests/markdown-citations.ieee.html @@ -53,4 +53,4 @@ ></li ></ol ></div -> +>
\ No newline at end of file |