summaryrefslogtreecommitdiffstats
path: root/md_tw.py
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2018-04-01 06:33:23 +0000
committerrsiddharth <s@ricketyspace.net>2018-04-01 06:42:29 +0000
commit74a49b17ab90af2fe57a1d10f12550cdca0fad4a (patch)
treeb643de1f957bb31fcf7759a2491300cf30740f2b /md_tw.py
parentfe18c156d31a63bd1adda24c8493304aea98357b (diff)
md_tw.py: Update TWRenderer.block_code.
Don't add prefix for empty lines. * markdown_textwrap/_version.py (__version__): Update variable. * md_tw.py (TWRenderer.block_code): Update method.
Diffstat (limited to 'md_tw.py')
-rw-r--r--md_tw.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/md_tw.py b/md_tw.py
index 1ceb800..b61c409 100644
--- a/md_tw.py
+++ b/md_tw.py
@@ -266,7 +266,7 @@ class TWRenderer(mistune.Renderer):
def block_code(self, code, lang=None):
out = '{}'.format(code)
out = textwrap.indent(out, self.tw_get('initial_indent'),
- lambda line: True)
+ lambda line: len(line.strip()) > 0)
return out
def block_quote(self, text):