git.iko.soy/typeable/pandoc
on master help sign in
Fixed block quote output in markdown writer: previously,
a6f3dd3fiddlosopher
src/Text/Pandoc/Writers/Markdown.hs+4−4
@@ -91,8 +91,8 @@ notesToMarkdown opts notes =
91
91
92-- | Return markdown representation of a note.
92-- | Return markdown representation of a note.
93noteToMarkdown :: WriterOptions -> Int -> [Block] -> State WriterState Doc
93noteToMarkdown :: WriterOptions -> Int -> [Block] -> State WriterState Doc
94−noteToMarkdown opts num note = do
94+noteToMarkdown opts num blocks = do
95− contents <- blockListToMarkdown opts note
95+ contents <- blockListToMarkdown opts blocks
96 let marker = text "[^" <> text (show num) <> text "]:"
96 let marker = text "[^" <> text (show num) <> text "]:"
97 return $ hang marker (writerTabStop opts) contents
97 return $ hang marker (writerTabStop opts) contents
98
98
@@ -163,8 +163,8 @@ blockToMarkdown opts (CodeBlock str) = return $
163 (nest (writerTabStop opts) $ vcat $ map text (lines str)) <> text "\n"
163 (nest (writerTabStop opts) $ vcat $ map text (lines str)) <> text "\n"
164blockToMarkdown opts (BlockQuote blocks) = do
164blockToMarkdown opts (BlockQuote blocks) = do
165 contents <- blockListToMarkdown opts blocks
165 contents <- blockListToMarkdown opts blocks
166− let quotedContents = unlines $ map ("> " ++) $ lines $ render contents
166+ return $ (vcat $ map (text . ("> " ++)) $ lines $ render contents) <>
167− return $ text quotedContents
167+ text "\n"
168blockToMarkdown opts (Table caption aligns widths headers rows) = do
168blockToMarkdown opts (Table caption aligns widths headers rows) = do
169 caption' <- inlineListToMarkdown opts caption
169 caption' <- inlineListToMarkdown opts caption
170 let caption'' = if null caption
170 let caption'' = if null caption