Markdown writer: Avoid printing excess spaces at end if no notes/refs.

This commit is contained in:
John MacFarlane 2011-01-20 22:36:08 -08:00
parent 8011d079c8
commit 8894b1a030

View file

@ -102,7 +102,8 @@ pandocToMarkdown opts (Pandoc (Meta title authors date) blocks) = do
then Just $ writerColumns opts
else Nothing
let main = render colwidth $ body <>
blankline <> notes' <> blankline <> refs'
(if isEmpty notes' then empty else blankline <> notes') <>
(if isEmpty refs' then empty else blankline <> refs')
let context = writerVariables opts ++
[ ("toc", render colwidth toc)
, ("body", main)