diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Writers/ConTeXt.hs | 2 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/Man.hs | 2 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/Markdown.hs | 2 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/RST.hs | 2 | ||||
-rw-r--r-- | src/pandoc.hs | 2 |
5 files changed, 5 insertions, 5 deletions
diff --git a/src/Text/Pandoc/Writers/ConTeXt.hs b/src/Text/Pandoc/Writers/ConTeXt.hs index 73aadd771..395bc2d30 100644 --- a/src/Text/Pandoc/Writers/ConTeXt.hs +++ b/src/Text/Pandoc/Writers/ConTeXt.hs @@ -64,7 +64,7 @@ pandocToConTeXt options (Pandoc (Meta title authors date) blocks) = do then return "" else liftM render $ inlineListToConTeXt date body <- blockListToConTeXt blocks - let main = render body + let main = render $ body $$ text "" let context = writerVariables options ++ [ ("toc", if writerTableOfContents options then "yes" else "") , ("body", main) diff --git a/src/Text/Pandoc/Writers/Man.hs b/src/Text/Pandoc/Writers/Man.hs index 45e7e5083..a46a18893 100644 --- a/src/Text/Pandoc/Writers/Man.hs +++ b/src/Text/Pandoc/Writers/Man.hs @@ -63,7 +63,7 @@ pandocToMan opts (Pandoc (Meta title authors date) blocks) = do body <- blockListToMan opts blocks notes <- liftM stNotes get notes' <- notesToMan opts (reverse notes) - let main = render $ body $$ notes' + let main = render $ body $$ notes' $$ text "" hasTables <- liftM stHasTables get let context = writerVariables opts ++ [ ("body", main) 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) diff --git a/src/Text/Pandoc/Writers/RST.hs b/src/Text/Pandoc/Writers/RST.hs index 14566252c..e79f97b33 100644 --- a/src/Text/Pandoc/Writers/RST.hs +++ b/src/Text/Pandoc/Writers/RST.hs @@ -70,7 +70,7 @@ pandocToRST (Pandoc (Meta tit auth dat) blocks) = do refs <- liftM (reverse . stLinks) get >>= refsToRST pics <- liftM (reverse . stImages) get >>= pictRefsToRST hasMath <- liftM stHasMath get - let main = render $ body $+$ notes $+$ text "" $+$ refs $+$ pics + let main = render $ foldl ($+$) empty $ [body, notes, refs, pics] let context = writerVariables opts ++ [ ("body", main) , ("title", render title) diff --git a/src/pandoc.hs b/src/pandoc.hs index cd4d65aa5..8ba4616ae 100644 --- a/src/pandoc.hs +++ b/src/pandoc.hs @@ -833,5 +833,5 @@ main = do writerOutput <- writer writerOptions doc'' if outputFile == "-" - then B.putStrLn writerOutput + then B.putStr writerOutput else B.writeFile outputFile writerOutput |