summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2018-03-05 02:31:54 +0000
committerrsiddharth <s@ricketyspace.net>2018-03-05 02:31:54 +0000
commit3822bf22e4028fa6410e51b0715e664927643563 (patch)
tree4af9c922e4012462e31c6707abfe856c137fc096
parent3064d6854750a4e20005b9a376bce6d144752d8f (diff)
md_tw.py: Add TWRenderer.footnote_item.
* md_tw.py (TWRenderer)[footnote_item]: New method.
-rw-r--r--md_tw.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/md_tw.py b/md_tw.py
index ca12027..ba85ea0 100644
--- 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.