diff options
author | rsiddharth <s@ricketyspace.net> | 2018-02-24 21:31:18 +0000 |
---|---|---|
committer | rsiddharth <s@ricketyspace.net> | 2018-02-24 21:31:18 +0000 |
commit | 05c68a203e39272d16a1d6109da2140d628fd9e7 (patch) | |
tree | 675f8ee74ad79dd293cffd5c06bd5f1e7b6bb485 | |
parent | de60264585b4056f849f1defa214ce29506384d2 (diff) |
md_tw.py: Update TWMarkdown.output_list_item.
Set width beforing rendering item.
* md_tw.py (TWMarkdown)[output_list_item]: Update function.
-rw-r--r-- | md_tw.py | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -380,6 +380,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) @@ -393,6 +399,9 @@ class TWMarkdown(mistune.Markdown): # Remove prefix self._remove_prefix(len(indent)) + # Revert width + self.renderer.tw_set(width=o_width) + return rendered_li def output_loose_item(self): |