markdown-textwrap

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

commit 3822bf22e4028fa6410e51b0715e664927643563
parent 3064d6854750a4e20005b9a376bce6d144752d8f
Author: rsiddharth <s@ricketyspace.net>
Date:   Mon,  5 Mar 2018 02:31:54 +0000

md_tw.py: Add TWRenderer.footnote_item.

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

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

diff --git a/md_tw.py b/md_tw.py @@ -304,6 +304,10 @@ class TWRenderer(mistune.Renderer): out = '{}'.format(text) return out + def footnote_item(self, key, text): + out = '[^{}]: {}\n'.format(key, text) + return out + class TWMarkdown(mistune.Markdown): """Text Wrap Markdown parser.