markdown-textwrap

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

commit b6ae71a56c966c5236201ba50a52d768ee9fca73
parent 87936b0d2113ac0dbba604d7ac1625399c0051d8
Author: rsiddharth <s@ricketyspace.net>
Date:   Sun, 25 Feb 2018 06:10:22 +0000

md_tw.py: Add TWRenderer.header.

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

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

diff --git a/md_tw.py b/md_tw.py @@ -279,6 +279,13 @@ class TWRenderer(mistune.Renderer): lambda line: True) return out + + def header(self, text, level, raw=None): + out = '{}'.format(text) + + return out + + def paragraph(self, text): out = self.tw_fill(text) out = '{}\n{}\n'.format(out, self.tw_get('initial_indent').strip())