aboutsummaryrefslogtreecommitdiff
path: root/src/Text/Pandoc/Writers/Markdown.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2010-07-20 12:42:12 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2010-07-20 12:42:12 -0700
commitfeb70b6e93151682d0560ea30318d5c23ecae8e9 (patch)
tree431d88e7c062c361a4ab64c2312d83e561d02a52 /src/Text/Pandoc/Writers/Markdown.hs
parent465a4a66993eba9017faa950a9737ae1c5f68786 (diff)
downloadpandoc-feb70b6e93151682d0560ea30318d5c23ecae8e9.tar.gz
Made spacing at end of output more consistent.
Previously some of the writers added spurious whitespace. This has been removed, resolving Issue #232. NOTE: If your application combines pandoc's output with other text, for example in a template, you may need to add spacing. For example, a pandoc-generated markdown file will not have a blank line after the final block element. If you are inserting it into another markdown file, you will need to make sure there is a blank line between it and the next block element.
Diffstat (limited to 'src/Text/Pandoc/Writers/Markdown.hs')
-rw-r--r--src/Text/Pandoc/Writers/Markdown.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs
index d6cd2a296..1b612006b 100644
--- a/src/Text/Pandoc/Writers/Markdown.hs
+++ b/src/Text/Pandoc/Writers/Markdown.hs
@@ -96,7 +96,7 @@ pandocToMarkdown opts (Pandoc (Meta title authors date) blocks) = do
notes' <- notesToMarkdown opts (reverse $ stNotes st)
st' <- get -- note that the notes may contain refs
refs' <- refsToMarkdown opts (reverse $ stRefs st')
- let main = render $ body $+$ text "" $+$ notes' $+$ text "" $+$ refs'
+ let main = render $ foldl ($+$) empty $ [body, notes', refs']
let context = writerVariables opts ++
[ ("toc", render toc)
, ("body", main)