diff options
author | Rob Austein <sra@hactrn.net> | 2021-05-09 23:45:48 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2021-05-09 23:45:48 +0000 |
commit | 78b3ed35c726cf8ef0ec4c4e7753e6f4775b9001 (patch) | |
tree | c0807af26f39d382e0472ed9cef26322d3b1b56a /trac2md.py | |
parent | 96f8ab4641056020192175c0a02c562e8113dbd7 (diff) |
Finally get hanging text in lists mostly right
Diffstat (limited to 'trac2md.py')
-rwxr-xr-x | trac2md.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -164,17 +164,19 @@ class Trac2Markdown: prev_indent = 0 in_list = True indent = len(line) - len(nested_line) + text_indent = len(line) - len(nested_line[1:].lstrip()) if indent > prev_indent: nested_level += 1 elif indent < prev_indent: nested_level -= 1 prev_indent = indent line = ' ' * nested_level + nested_line - elif in_list: + elif in_list and len(line) < len(nested_line) + text_indent: new_content.append("\n") in_list = False nested_level = 0 prev_indent = 0 + text_indent = 0 # Convert headers line = self.convert_headers(line) |