aboutsummaryrefslogtreecommitdiff
path: root/src/Text
diff options
context:
space:
mode:
authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-08-17 18:48:16 +0000
committerfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b>2007-08-17 18:48:16 +0000
commita6f3dd375571e335c9673e388b6449bab242d5fe (patch)
treed037a2f812ab791c29ef7b14c8b3cc91d270f676 /src/Text
parent4b852dfd969748a7f452774ac1d5fa7f1207af21 (diff)
downloadpandoc-a6f3dd375571e335c9673e388b6449bab242d5fe.tar.gz
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
Diffstat (limited to 'src/Text')
-rw-r--r--src/Text/Pandoc/Writers/Markdown.hs8
1 files changed, 4 insertions, 4 deletions
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