diff options
| author | John MacFarlane <[email protected]> | 2024-06-23 14:33:58 -0700 |
|---|---|---|
| committer | John MacFarlane <[email protected]> | 2024-06-23 14:33:58 -0700 |
| commit | 965de61edbd41b4bebea76c557afc99199cf08eb (patch) | |
| tree | 0ef6e73739959e5c1b7ce1319e7a3e3d139a27f6 | |
| parent | 07602dedaeda8cc0fb5a0cb2cc0f91c8f69db1a7 (diff) | |
Markdown writer: fix bug with block quotes in lists.
Closes #9908.
| -rw-r--r-- | src/Text/Pandoc/Writers/Markdown.hs | 2 | ||||
| -rw-r--r-- | test/command/9908.md | 10 |
2 files changed, 11 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs index 2eaaa54bf..275fe1ec0 100644 --- a/src/Text/Pandoc/Writers/Markdown.hs +++ b/src/Text/Pandoc/Writers/Markdown.hs @@ -592,7 +592,7 @@ blockToMarkdown' opts (BlockQuote blocks) = do | variant == PlainText = " " | otherwise = "> " contents <- blockListToMarkdown opts blocks - return $ prefixed leader contents <> blankline + return $ text leader <> prefixed leader contents <> blankline blockToMarkdown' opts t@(Table (ident,_,_) blkCapt specs thead tbody tfoot) = do let (caption, aligns, widths, headers, rows) = toLegacyTable blkCapt specs thead tbody tfoot let numcols = maximum (length aligns :| length widths : diff --git a/test/command/9908.md b/test/command/9908.md new file mode 100644 index 000000000..9954298e0 --- /dev/null +++ b/test/command/9908.md @@ -0,0 +1,10 @@ +``` +% pandoc -f native -t markdown +[ BulletList + [ [ BlockQuote [ Para [ Str "a" ] , Para [ Str "b" ] ] ] ] +] +^D +- > a + > + > b +``` |
