diff options
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/trac2md.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tools/trac2md.py b/tools/trac2md.py index 01d7f41..ab0bf79 100755 --- a/tools/trac2md.py +++ b/tools/trac2md.py @@ -115,10 +115,11 @@ def WikiToMD(content): in_list = False nested_level = 0 prev_indent = 0 + old_content = content.splitlines() new_content = [] - for line in content.split('\n'): - line = line.replace("\r", "") + while old_content: + line = old_content.pop(0).replace("\r", "") while "{{{" in line or "}}}" in line: if "{{{" in line: code_block = True |