diff options
author | rsiddharth <s@ricketyspace.net> | 2018-04-01 06:57:26 +0000 |
---|---|---|
committer | rsiddharth <s@ricketyspace.net> | 2018-04-01 06:57:26 +0000 |
commit | b11ad48934ead29ba421216f83be32cc8cb6e373 (patch) | |
tree | 8996afee7524401efd50b5195da3113a9c5ed1ca /md_tw.py | |
parent | ce1b7afe62b70c7e7c45c20ca9d96a3e6d6e8a89 (diff) |
md_tw.py: Update TWMarkdown.output_list_item.
* md_tw.py (TWMarkdown.output_list_item): Update method.
* tests/data/renderer-lists-w.md: Update file.
* tests/data/renderer-lists.md: Update file.
Diffstat (limited to 'md_tw.py')
-rw-r--r-- | md_tw.py | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -415,10 +415,10 @@ class TWMarkdown(mistune.Markdown): if self.token['type'] == 'text': txt = self.renderer.tw_fill(self.tok_text()) else: - txt = self.tok() + txt = '\n' + self.tok() if rm_i_indent: - txt = txt.lstrip() + txt = txt.lstrip(self.renderer.tw_get('initial_indent')) # Don't remove initial indent after processing first item. rm_i_indent = False @@ -440,6 +440,7 @@ class TWMarkdown(mistune.Markdown): # Process list item while self.pop()['type'] != 'list_item_end': body += process() + body = body.rstrip() # Render list item rendered_li = self.renderer.list_item(body) |