markdown-textwrap

text wrap markdown documents
git clone git://git.ricketyspace.net/markdown-textwrap.git
Log | Files | Refs

commit 29c723f28ec273b797930009af28aeb5708b3370
parent 887652565943937a92e9d658c390ac34d3d25637
Author: rsiddharth <s@ricketyspace.net>
Date:   Sun, 18 Feb 2018 19:25:01 +0000

md_tw.py: Add TWRenderer.block_quote.

* md_tw.py (TWRenderer)[block_quote]: New method.

Diffstat:
md_tw.py | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/md_tw.py b/md_tw.py @@ -262,6 +262,10 @@ class TWRenderer(mistune.Renderer): lambda line: True) return out + def block_quote(self, text): + out = '{}'.format(text.rstrip('>\n')) + return out + def paragraph(self, text): out = self._tw_fill(text) out = '{}\n{}\n'.format(out, self.tw_get('initial_indent').strip())