summaryrefslogtreecommitdiffstats
path: root/md_tw.py
diff options
context:
space:
mode:
Diffstat (limited to 'md_tw.py')
-rw-r--r--md_tw.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/md_tw.py b/md_tw.py
index dbd3a44..ecb75ff 100644
--- a/md_tw.py
+++ b/md_tw.py
@@ -256,6 +256,11 @@ class TWRenderer(mistune.Renderer):
self.tw_set(**kwargs)
return self.tw.fill(text)
+ def block_code(self, code, lang=None):
+ out = '{}'.format(code)
+ out = textwrap.indent(out, self.tw_get('initial_indent'),
+ lambda line: True)
+ return out
def paragraph(self, text):
wrapped = self._tw_fill(text)