diff options
50 files changed, 10 insertions, 67 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 diff --git a/templates/docbook.template b/templates/docbook.template index 374a8fbf2..cd9ec59ca 100644 --- a/templates/docbook.template +++ b/templates/docbook.template @@ -25,4 +25,3 @@ $for(include-after)$ $include-after$ $endfor$ </article> - diff --git a/tests/html-reader.native b/tests/html-reader.native index 5eb74768c..ee419d3ac 100644 --- a/tests/html-reader.native +++ b/tests/html-reader.native @@ -344,4 +344,3 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA , Para [Str "Caret",Space,Str "characters",Space,Str "are",Space,Str "used",Space,Str "to",Space,Str "indicate",Space,Str "that",Space,Str "the",Space,Str "blocks",Space,Str "all",Space,Str "belong",Space,Str "to",Space,Str "a",Space,Str "single",Space,Str "footnote",Space,Str "(as",Space,Str "with",Space,Str "block",Space,Str "quotes)."] , CodeBlock ("",[],[]) " { <code> }" , Para [Str "If",Space,Str "you",Space,Str "want,",Space,Str "you",Space,Str "can",Space,Str "use",Space,Str "a",Space,Str "caret",Space,Str "at",Space,Str "the",Space,Str "beginning",Space,Str "of",Space,Str "every",Space,Str "line,",Space,Str "as",Space,Str "with",Space,Str "blockquotes,",Space,Str "but",Space,Str "all",Space,Str "that",Space,Str "you",Space,Str "need",Space,Str "is",Space,Str "a",Space,Str "caret",Space,Str "at",Space,Str "the",Space,Str "beginning",Space,Str "of",Space,Str "the",Space,Str "first",Space,Str "line",Space,Str "of",Space,Str "the",Space,Str "block",Space,Str "and",Space,Str "any",Space,Str "preceding",Space,Str "blank",Space,Str "lines."] ] - diff --git a/tests/latex-reader.native b/tests/latex-reader.native index 76e5daf08..921bf9d77 100644 --- a/tests/latex-reader.native +++ b/tests/latex-reader.native @@ -375,4 +375,3 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA [ [ Para [Str "And",Space,Str "in",Space,Str "list",Space,Str "items.",Note [Para [Str "In",Space,Str "list."]]] ] ] , Para [Str "This",Space,Str "paragraph",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "part",Space,Str "of",Space,Str "the",Space,Str "note,",Space,Str "as",Space,Str "it",Space,Str "is",Space,Str "not",Space,Str "indented."] ] - diff --git a/tests/lhs-test.fragment.html+lhs b/tests/lhs-test.fragment.html+lhs index 5ebfcacbf..74180d5c1 100644 --- a/tests/lhs-test.fragment.html+lhs +++ b/tests/lhs-test.fragment.html+lhs @@ -36,4 +36,4 @@ ><p >foo bar</p ></blockquote -> +>
\ No newline at end of file diff --git a/tests/lhs-test.html b/tests/lhs-test.html index 4e69852a3..1cfcb199a 100644 --- a/tests/lhs-test.html +++ b/tests/lhs-test.html @@ -66,4 +66,3 @@ pre.sourceCode span.er { color: red; font-weight: bold; } > </body> </html> - diff --git a/tests/lhs-test.html+lhs b/tests/lhs-test.html+lhs index 20a21091f..a33bf83ce 100644 --- a/tests/lhs-test.html+lhs +++ b/tests/lhs-test.html+lhs @@ -66,4 +66,3 @@ pre.sourceCode span.er { color: red; font-weight: bold; } > </body> </html> - diff --git a/tests/lhs-test.latex b/tests/lhs-test.latex index ee078546b..bd1041861 100644 --- a/tests/lhs-test.latex +++ b/tests/lhs-test.latex @@ -35,4 +35,3 @@ foo bar \end{quote} \end{document} - diff --git a/tests/lhs-test.latex+lhs b/tests/lhs-test.latex+lhs index e4041a3af..622e1b9ca 100644 --- a/tests/lhs-test.latex+lhs +++ b/tests/lhs-test.latex+lhs @@ -37,4 +37,3 @@ foo bar \end{quote} \end{document} - diff --git a/tests/lhs-test.markdown b/tests/lhs-test.markdown index 5b7c6465a..834d642d8 100644 --- a/tests/lhs-test.markdown +++ b/tests/lhs-test.markdown @@ -16,6 +16,3 @@ and one arrow on the second item of the pair). Block quote: > foo bar - - - diff --git a/tests/lhs-test.markdown+lhs b/tests/lhs-test.markdown+lhs index fa8564a98..187fa630f 100644 --- a/tests/lhs-test.markdown+lhs +++ b/tests/lhs-test.markdown+lhs @@ -17,6 +17,3 @@ and one arrow on the second item of the pair). Block quote: > foo bar - - - diff --git a/tests/lhs-test.native b/tests/lhs-test.native index 51274399b..94150f069 100644 --- a/tests/lhs-test.native +++ b/tests/lhs-test.native @@ -8,4 +8,3 @@ Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []}) , BlockQuote [ Para [Str "foo",Space,Str "bar"] ] ] - diff --git a/tests/lhs-test.rst b/tests/lhs-test.rst index c567fb4ed..67f7b3984 100644 --- a/tests/lhs-test.rst +++ b/tests/lhs-test.rst @@ -22,5 +22,3 @@ Block quote: foo bar - - diff --git a/tests/lhs-test.rst+lhs b/tests/lhs-test.rst+lhs index 7feeea2dc..22d54e85e 100644 --- a/tests/lhs-test.rst+lhs +++ b/tests/lhs-test.rst+lhs @@ -20,5 +20,3 @@ Block quote: foo bar - - diff --git a/tests/markdown-reader-more.native b/tests/markdown-reader-more.native index f6747c3b1..104baeaa6 100644 --- a/tests/markdown-reader-more.native +++ b/tests/markdown-reader-more.native @@ -40,4 +40,3 @@ Pandoc (Meta {docTitle = [Str "Title",Space,Str "spanning",Space,Str "multiple", , OrderedList (3,Example,TwoParens) [ [ Plain [Str "Third",Space,Str "example",Str "."] ] ] ] - diff --git a/tests/rst-reader.native b/tests/rst-reader.native index eddeb6e8d..b79d35bd9 100644 --- a/tests/rst-reader.native +++ b/tests/rst-reader.native @@ -309,4 +309,3 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite",Str ": [ [ Plain [Str "b"] ] , [ Plain [Str "b",Space,Str "2"] ] , [ Plain [Str "b",Space,Str "2"] ] ] ], [ Plain [Str "c",Space,Str "c",Space,Str "2",Space,Str "c",Space,Str "2"] ] ] ] ] - diff --git a/tests/s5.basic.html b/tests/s5.basic.html index 659fc065a..39f1ffab4 100644 --- a/tests/s5.basic.html +++ b/tests/s5.basic.html @@ -316,4 +316,3 @@ </div> </body> </html> - diff --git a/tests/s5.fancy.html b/tests/s5.fancy.html index 1379c3e2e..8e29408f2 100644 --- a/tests/s5.fancy.html +++ b/tests/s5.fancy.html @@ -517,4 +517,3 @@ </div> </body> </html> - diff --git a/tests/s5.fragment.html b/tests/s5.fragment.html index 9845e1409..cc111566a 100644 --- a/tests/s5.fragment.html +++ b/tests/s5.fragment.html @@ -14,4 +14,4 @@ >$\frac{d}{dx}f(x)=\lim_{h\to 0}\frac{f(x+h)-f(x)}{h}$</span ></li ></ul -> +>
\ No newline at end of file diff --git a/tests/s5.inserts.html b/tests/s5.inserts.html index f909850d8..90014f2e6 100644 --- a/tests/s5.inserts.html +++ b/tests/s5.inserts.html @@ -33,4 +33,3 @@ STUFF INSERTED STUFF INSERTED </body> </html> - diff --git a/tests/tables-rstsubset.native b/tests/tables-rstsubset.native index f26e46e90..7941772b5 100644 --- a/tests/tables-rstsubset.native +++ b/tests/tables-rstsubset.native @@ -116,4 +116,3 @@ Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []}) , [ Plain [Str "row"] ] , [ Plain [Str "5.0"] ] , [ Plain [Str "Here's",Space,Str "another",Space,Str "one.",Space,Str "Note",Space,Str "the",Space,Str "blank",Space,Str "line",Space,Str "between",Space,Str "rows."] ] ] ] ] - diff --git a/tests/tables.docbook b/tests/tables.docbook index 6483a97c0..a24964600 100644 --- a/tests/tables.docbook +++ b/tests/tables.docbook @@ -399,4 +399,4 @@ </td> </tr> </tbody> -</informaltable> +</informaltable>
\ No newline at end of file diff --git a/tests/tables.html b/tests/tables.html index e4dd6be58..93944828c 100644 --- a/tests/tables.html +++ b/tests/tables.html @@ -298,4 +298,4 @@ ></tr ></tbody ></table -> +>
\ No newline at end of file diff --git a/tests/tables.latex b/tests/tables.latex index 7f29b72c3..5dac8e2a0 100644 --- a/tests/tables.latex +++ b/tests/tables.latex @@ -175,4 +175,3 @@ Second \\ \end{tabular} \end{center} - diff --git a/tests/tables.markdown b/tests/tables.markdown index ab20e76c9..95bcc667e 100644 --- a/tests/tables.markdown +++ b/tests/tables.markdown @@ -74,6 +74,3 @@ Multiline table without column headers: the blank line between rows. ----------- ---------- ------------ -------------------------- - - - diff --git a/tests/tables.mediawiki b/tests/tables.mediawiki index 4836ecd79..d0e5c7b9e 100644 --- a/tests/tables.mediawiki +++ b/tests/tables.mediawiki @@ -209,4 +209,3 @@ Multiline table without column headers: </tr> </tbody> </table> - diff --git a/tests/tables.native b/tests/tables.native index 11304795c..8592831fe 100644 --- a/tests/tables.native +++ b/tests/tables.native @@ -113,4 +113,3 @@ Pandoc (Meta {docTitle = [], docAuthors = [], docDate = []}) , [ Plain [Str "row"] ] , [ Plain [Str "5",Str ".",Str "0"] ] , [ Plain [Str "Here",Str "'",Str "s",Space,Str "another",Space,Str "one",Str ".",Space,Str "Note",Space,Str "the",Space,Str "blank",Space,Str "line",Space,Str "between",Space,Str "rows",Str "."] ] ] ] ] - diff --git a/tests/tables.opendocument b/tests/tables.opendocument index 6cbfa00eb..c071e526d 100644 --- a/tests/tables.opendocument +++ b/tests/tables.opendocument @@ -381,4 +381,4 @@ <text:p text:style-name="Table_20_Contents">Here's another one. Note the blank line between rows.</text:p> </table:table-cell> </table:table-row> -</table:table> +</table:table>
\ No newline at end of file diff --git a/tests/tables.plain b/tests/tables.plain index ab20e76c9..95bcc667e 100644 --- a/tests/tables.plain +++ b/tests/tables.plain @@ -74,6 +74,3 @@ Multiline table without column headers: the blank line between rows. ----------- ---------- ------------ -------------------------- - - - diff --git a/tests/tables.rst b/tests/tables.rst index c7c0c954d..25d5932ea 100644 --- a/tests/tables.rst +++ b/tests/tables.rst @@ -88,5 +88,3 @@ Multiline table without column headers: | | | | the blank line between | | | | | rows. | +-------------+------------+--------------+----------------------------+ - - diff --git a/tests/tables.rtf b/tests/tables.rtf index e7c1e9f60..011724967 100644 --- a/tests/tables.rtf +++ b/tests/tables.rtf @@ -357,4 +357,3 @@ } \intbl\row} {\pard \ql \f0 \sa180 \li0 \fi0 \par} - diff --git a/tests/tables.texinfo b/tests/tables.texinfo index f18de7012..b82006f1a 100644 --- a/tests/tables.texinfo +++ b/tests/tables.texinfo @@ -156,4 +156,3 @@ Second @tab 5.0 @tab Here's another one. Note the blank line between rows. @end multitable - diff --git a/tests/testsuite.native b/tests/testsuite.native index 7560317c5..ced38537c 100644 --- a/tests/testsuite.native +++ b/tests/testsuite.native @@ -415,4 +415,3 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA [ [ Plain [Str "And",Space,Str "in",Space,Str "list",Space,Str "items",Str ".",Note [Para [Str "In",Space,Str "list",Str "."]]] ] ] , Para [Str "This",Space,Str "paragraph",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "part",Space,Str "of",Space,Str "the",Space,Str "note,",Space,Str "as",Space,Str "it",Space,Str "is",Space,Str "not",Space,Str "indented",Str "."] ] - diff --git a/tests/writer.context b/tests/writer.context index 288d6970c..2c53fde5c 100644 --- a/tests/writer.context +++ b/tests/writer.context @@ -906,4 +906,3 @@ This paragraph should not be part of the note, as it is not indented. \stoptext - diff --git a/tests/writer.docbook b/tests/writer.docbook index 2d86cfe0e..c17513cf9 100644 --- a/tests/writer.docbook +++ b/tests/writer.docbook @@ -1462,5 +1462,3 @@ or here: <http://example.com/> </para> </section> </article> - - diff --git a/tests/writer.html b/tests/writer.html index 72c93ee71..39ae2ebb7 100644 --- a/tests/writer.html +++ b/tests/writer.html @@ -1163,4 +1163,3 @@ document.write('<a h'+'ref'+'="ma'+'ilto'+':'+e+'">'+'<code>'+e+'</code>'+'<\/'+ > </body> </html> - diff --git a/tests/writer.latex b/tests/writer.latex index 4b54b9d07..554003021 100644 --- a/tests/writer.latex +++ b/tests/writer.latex @@ -864,4 +864,3 @@ This paragraph should not be part of the note, as it is not indented. \end{document} - diff --git a/tests/writer.man b/tests/writer.man index c0b2aa8b6..e4dc0c7de 100644 --- a/tests/writer.man +++ b/tests/writer.man @@ -798,4 +798,3 @@ In quote. In list. .SH AUTHORS John MacFarlane; Anonymous. - diff --git a/tests/writer.markdown b/tests/writer.markdown index c3f3fcc26..b417a8fee 100644 --- a/tests/writer.markdown +++ b/tests/writer.markdown @@ -715,7 +715,6 @@ note] Here is an inline note.[^3] This paragraph should not be part of the note, as it is not indented. - [^1]: Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document. @@ -741,5 +740,3 @@ indented. [^5]: In list. - - diff --git a/tests/writer.mediawiki b/tests/writer.mediawiki index 5873ea831..557396bfb 100644 --- a/tests/writer.mediawiki +++ b/tests/writer.mediawiki @@ -660,4 +660,3 @@ If you want, you can indent every line, but you can also be lazy and just indent This paragraph should not be part of the note, as it is not indented. <references /> - diff --git a/tests/writer.native b/tests/writer.native index 7560317c5..ced38537c 100644 --- a/tests/writer.native +++ b/tests/writer.native @@ -415,4 +415,3 @@ Pandoc (Meta {docTitle = [Str "Pandoc",Space,Str "Test",Space,Str "Suite"], docA [ [ Plain [Str "And",Space,Str "in",Space,Str "list",Space,Str "items",Str ".",Note [Para [Str "In",Space,Str "list",Str "."]]] ] ] , Para [Str "This",Space,Str "paragraph",Space,Str "should",Space,Str "not",Space,Str "be",Space,Str "part",Space,Str "of",Space,Str "the",Space,Str "note,",Space,Str "as",Space,Str "it",Space,Str "is",Space,Str "not",Space,Str "indented",Str "."] ] - diff --git a/tests/writer.opendocument b/tests/writer.opendocument index 039118659..a08e5cf0a 100644 --- a/tests/writer.opendocument +++ b/tests/writer.opendocument @@ -1452,4 +1452,3 @@ Cat <text:s text:c="3" />& 1 <text:s text:c="5" />\\ \hline </office:text> </office:body> </office:document-content> - diff --git a/tests/writer.plain b/tests/writer.plain index bd7d3a3dc..bc6d25467 100644 --- a/tests/writer.plain +++ b/tests/writer.plain @@ -669,7 +669,6 @@ Here is an inline note.[^3] This paragraph should not be part of the note, as it is not indented. - [^1]: Here is the footnote. It can go anywhere after the footnote reference. It need not be placed at the end of the document. @@ -694,5 +693,3 @@ indented. [^5]: In list. - - diff --git a/tests/writer.rst b/tests/writer.rst index 35df8002a..dff04bc81 100644 --- a/tests/writer.rst +++ b/tests/writer.rst @@ -888,6 +888,4 @@ indented. .. [5] In list. - .. |movie| image:: movie.jpg - diff --git a/tests/writer.rtf b/tests/writer.rtf index 9bb6547cb..3cb1d2996 100644 --- a/tests/writer.rtf +++ b/tests/writer.rtf @@ -450,4 +450,3 @@ links }\sa180\par} {\pard \ql \f0 \sa180 \li0 \fi0 This paragraph should not be part of the note, as it is not indented.\par} } - diff --git a/tests/writer.texinfo b/tests/writer.texinfo index 149b5a737..3344845b0 100644 --- a/tests/writer.texinfo +++ b/tests/writer.texinfo @@ -1014,4 +1014,3 @@ And in list items.@footnote{In list.} This paragraph should not be part of the note@comma{} as it is not indented. @bye - |