summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2018-02-18 19:21:00 +0000
committerrsiddharth <s@ricketyspace.net>2018-02-18 19:21:00 +0000
commit9e8e72506927c619f50b2b0369796c5dfd2da8b5 (patch)
treeb4e8577e2aeb611cd3b91b9aae82736b9becd35a
parent35fa8e8980bb630df2d712c9166bba853f50cff4 (diff)
md_tw.py: Add TWRenderer.tw_get.
* md_tw.py (TWRenderer)[tw_get]: New method.
-rw-r--r--md_tw.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/md_tw.py b/md_tw.py
index 4b833ba..dbd3a44 100644
--- a/md_tw.py
+++ b/md_tw.py
@@ -224,6 +224,11 @@ class TWRenderer(mistune.Renderer):
width=kwargs.get('tw_width', 72)
)
+ def tw_get(self, attr):
+ """Get attribute from the local textwrap.TextWrapper instance.
+ """
+ return getattr(self.tw, attr, None)
+
def tw_set(self, **kwargs):
"""