diff options
author | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2006-12-16 05:05:02 +0000 |
---|---|---|
committer | fiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> | 2006-12-16 05:05:02 +0000 |
commit | fe66a90a2a88c66b1d518a932f29d9225e31ab8f (patch) | |
tree | 184b24e2bc641b51422554375dc803ccd5f2649b /src/Text/Pandoc | |
parent | 61ec2c0d4a564158aaf976ca0c35caaa58cecdb8 (diff) | |
download | pandoc-fe66a90a2a88c66b1d518a932f29d9225e31ab8f.tar.gz |
Changed 'putStrLn' to 'putStr' in Main.hs, and modified some
of the readers to make spacing at end of output more consistent.
Modified tests accordingly.
git-svn-id: https://pandoc.googlecode.com/svn/trunk@201 788f1e2b-df1e-0410-8736-df70ead52e1b
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Shared.hs | 2 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/Markdown.hs | 3 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/RST.hs | 7 |
3 files changed, 6 insertions, 6 deletions
diff --git a/src/Text/Pandoc/Shared.hs b/src/Text/Pandoc/Shared.hs index 07afba00e..b2686d941 100644 --- a/src/Text/Pandoc/Shared.hs +++ b/src/Text/Pandoc/Shared.hs @@ -140,7 +140,7 @@ prettyBlock block = show block -- | Prettyprint Pandoc document. prettyPandoc :: Pandoc -> String -prettyPandoc (Pandoc meta blocks) = "Pandoc " ++ "(" ++ (show meta) ++ ")\n" ++ (prettyBlockList 0 blocks) +prettyPandoc (Pandoc meta blocks) = "Pandoc " ++ "(" ++ (show meta) ++ ")\n" ++ (prettyBlockList 0 blocks) ++ "\n" -- | Convert tabs to spaces (with adjustable tab stop). tabsToSpaces :: Int -- ^ Tabstop diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs index 4ca131455..e7c167eb3 100644 --- a/src/Text/Pandoc/Writers/Markdown.hs +++ b/src/Text/Pandoc/Writers/Markdown.hs @@ -11,8 +11,7 @@ import Text.PrettyPrint.HughesPJ hiding ( Str ) writeMarkdown :: WriterOptions -> Pandoc -> String writeMarkdown options (Pandoc meta blocks) = let body = text (writerIncludeBefore options) <> - vcat (map (blockToMarkdown (writerTabStop options)) (formatKeys blocks)) $$ - text (writerIncludeAfter options) in + vcat (map (blockToMarkdown (writerTabStop options)) (formatKeys blocks)) $$ text (writerIncludeAfter options) in let head = if (writerStandalone options) then ((metaToMarkdown meta) $$ text (writerHeader options)) else diff --git a/src/Text/Pandoc/Writers/RST.hs b/src/Text/Pandoc/Writers/RST.hs index 7d08d152d..cc2bc6499 100644 --- a/src/Text/Pandoc/Writers/RST.hs +++ b/src/Text/Pandoc/Writers/RST.hs @@ -16,14 +16,15 @@ writeRST options (Pandoc meta blocks) = (metaToRST meta) $$ text (writerHeader options) else empty in - let refs' = nubBy (\x y -> (render x) == (render y)) refs in -- remove duplicate keys + -- remove duplicate keys + let refs' = nubBy (\x y -> (render x) == (render y)) refs in let body = text (writerIncludeBefore options) <> vcat main $$ text (writerIncludeAfter options) in - render $ top <> body $$ vcat refs' + render $ top <> body $$ vcat refs' $$ text "\n" -- | Escape special RST characters. escapeString :: String -> String -escapeString = backslashEscape "`\\|*_" +escapeString = backslashEscape "`\\|*_" -- | Convert list of inline elements into one 'Doc' of wrapped text and another -- containing references. |