diff options
author | rsiddharth <s@ricketyspace.net> | 2018-02-24 21:16:28 +0000 |
---|---|---|
committer | rsiddharth <s@ricketyspace.net> | 2018-02-24 21:16:28 +0000 |
commit | 530db56a1e6a7dc2c8b35fcb90181a6393bfa992 (patch) | |
tree | 0b5c12ed40cf3b045ca224a2bc25b754fb8580c4 | |
parent | a2e02ff4b24212412a09e6aef05b95205068eff6 (diff) |
md_tw.py: Update TWMarkdown.output_loose_item.
Set width before rendering item.
* md_tw.py (TWMarkdown)[output_loose_item]: Update method.
-rw-r--r-- | md_tw.py | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -416,6 +416,12 @@ class TWMarkdown(mistune.Markdown): # Add bullet body = self.renderer.tw_get('initial_indent') + self.token['text'] + # Set width + o_width = self.renderer.tw_get('width') + item_width = (o_width + - len(self.renderer.tw_get('initial_indent'))) + self.renderer.tw_set(width=item_width) + # Set prefix prefix = self._add_prefix(indent, i_indent, s_indent) @@ -428,6 +434,9 @@ class TWMarkdown(mistune.Markdown): # Remove prefix self._remove_prefix(len(indent), i_indent, s_indent) + # Revert width + self.renderer.tw_set(width=o_width) + return rendered_li |