diff --git a/src/mistune/renderers/markdown.py b/src/mistune/renderers/markdown.py index 1626980..b49081a 100644 --- a/src/mistune/renderers/markdown.py +++ b/src/mistune/renderers/markdown.py @@ -114,7 +114,8 @@ def block_code(self, token: Dict[str, Any], state: BlockState) -> str: return marker2 + info + "\n" + code + marker2 + "\n\n" def block_quote(self, token: Dict[str, Any], state: BlockState) -> str: - text = indent(self.render_children(token, state), '> ') + text = indent(self.render_children(token, state), '> ', lambda _: True) + text = text.rstrip("> \n") return text + '\n\n' def block_html(self, token: Dict[str, Any], state: BlockState) -> str: diff --git a/tests/fixtures/renderer_markdown.txt b/tests/fixtures/renderer_markdown.txt index 1440875..fd618f9 100644 --- a/tests/fixtures/renderer_markdown.txt +++ b/tests/fixtures/renderer_markdown.txt @@ -228,6 +228,18 @@ hello > quote ```````````````````````````````` +> quote + +> quote +> +> continuation +. +> quote + +> quote +> +> continuation + ## list ```````````````````````````````` example