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
This commit is contained in:
parent
4b852dfd96
commit
a6f3dd3755
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue