diff options
Diffstat (limited to 'src/Text/Pandoc/Writers')
-rw-r--r-- | src/Text/Pandoc/Writers/Markdown.hs | 3 | ||||
-rw-r--r-- | src/Text/Pandoc/Writers/RST.hs | 7 |
2 files changed, 5 insertions, 5 deletions
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. |