summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--md_tw.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/md_tw.py b/md_tw.py
index 0e51713..3bad4ca 100644
--- a/md_tw.py
+++ b/md_tw.py
@@ -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):