From a6f3dd375571e335c9673e388b6449bab242d5fe Mon Sep 17 00:00:00 2001 From: fiddlosopher Date: Fri, 17 Aug 2007 18:48:16 +0000 Subject: Fixed block quote output in markdown writer: previously, block quotes in notes would be indented only in the first line. git-svn-id: https://pandoc.googlecode.com/svn/trunk@859 788f1e2b-df1e-0410-8736-df70ead52e1b --- src/Text/Pandoc/Writers/Markdown.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs index e7acd762c..a96e11abf 100644 --- a/src/Text/Pandoc/Writers/Markdown.hs +++ b/src/Text/Pandoc/Writers/Markdown.hs @@ -91,8 +91,8 @@ notesToMarkdown opts notes = -- | Return markdown representation of a note. noteToMarkdown :: WriterOptions -> Int -> [Block] -> State WriterState Doc -noteToMarkdown opts num note = do - contents <- blockListToMarkdown opts note +noteToMarkdown opts num blocks = do + contents <- blockListToMarkdown opts blocks let marker = text "[^" <> text (show num) <> text "]:" return $ hang marker (writerTabStop opts) contents @@ -163,8 +163,8 @@ blockToMarkdown opts (CodeBlock str) = return $ (nest (writerTabStop opts) $ vcat $ map text (lines str)) <> text "\n" blockToMarkdown opts (BlockQuote blocks) = do contents <- blockListToMarkdown opts blocks - let quotedContents = unlines $ map ("> " ++) $ lines $ render contents - return $ text quotedContents + return $ (vcat $ map (text . ("> " ++)) $ lines $ render contents) <> + text "\n" blockToMarkdown opts (Table caption aligns widths headers rows) = do caption' <- inlineListToMarkdown opts caption let caption'' = if null caption -- cgit v1.2.3