summaryrefslogtreecommitdiff
path: root/trac2md.py
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2021-06-03 00:47:23 +0000
committerRob Austein <sra@hactrn.net>2021-06-03 00:47:23 +0000
commit8f033beb4527b6e8760b95e4e31068915ebdff05 (patch)
tree4d76570ae5c50600bb747fd575c20622c98bfc0e /trac2md.py
parent09ed31ba14426b734e8afc232869e950a7f6931c (diff)
Don't lose our marbles when outermost list level is indented
Diffstat (limited to 'trac2md.py')
-rwxr-xr-xtrac2md.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/trac2md.py b/trac2md.py
index 5a00754..e9b5f68 100755
--- a/trac2md.py
+++ b/trac2md.py
@@ -158,12 +158,12 @@ class Trac2Markdown:
#
nested_line = line.lstrip(' ')
if nested_line.startswith('- ') or nested_line.startswith('* '):
+ indent = len(line) - len(nested_line)
if not in_list:
new_content.append("\n")
nested_level = 0
- prev_indent = 0
+ prev_indent = indent
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