git.iko.soy/typeable/pandoc
on master help sign in
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

commita6f3dd375571e335c9673e388b6449bab242d5fe authorfiddlosopher <fiddlosopher@788f1e2b-df1e-0410-8736-df70ead52e1b> dateFri 17 Aug 2007, 18:48 (19 years ago) parent4b852df
1 file changed+4−4
src/Text/Pandoc/Writers/Markdown.hs+4−4
src/Text/Pandoc/Writers/Markdown.hs+4−4
@@ -91,8 +91,8 @@ notesToMarkdown opts notes =
9191
9292-- | Return markdown representation of a note.
9393noteToMarkdown :: WriterOptions -> Int -> [Block] -> State WriterState Doc
94−noteToMarkdown opts num note = do
95− contents <- blockListToMarkdown opts note
94+noteToMarkdown opts num blocks = do
95+ contents <- blockListToMarkdown opts blocks
9696 let marker = text "[^" <> text (show num) <> text "]:"
9797 return $ hang marker (writerTabStop opts) contents
9898
@@ -163,8 +163,8 @@ blockToMarkdown opts (CodeBlock str) = return $
163163 (nest (writerTabStop opts) $ vcat $ map text (lines str)) <> text "\n"
164164blockToMarkdown opts (BlockQuote blocks) = do
165165 contents <- blockListToMarkdown opts blocks
166− let quotedContents = unlines $ map ("> " ++) $ lines $ render contents
167− return $ text quotedContents
166+ return $ (vcat $ map (text . ("> " ++)) $ lines $ render contents) <>
167+ text "\n"
168168blockToMarkdown opts (Table caption aligns widths headers rows) = do
169169 caption' <- inlineListToMarkdown opts caption
170170 let caption'' = if null caption