aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/trac2md.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/tools/trac2md.py b/tools/trac2md.py
index 377cf20..5f440d3 100755
--- a/tools/trac2md.py
+++ b/tools/trac2md.py
@@ -150,13 +150,13 @@ def WikiToMD(content):
# alignment, start with just getting the basic table
# structure to something markdown will believe.
#
- if not code_block and line.strip().startswith("||"):
+ if line.strip().startswith("||"):
line = line.replace("=|", "|").replace("|=", "|")
line = line.replace("||", "|")
if not in_table:
tail.append("|---" * (line.count("|") - 1) + "|\n")
in_table = True
- elif not code_block and in_table and not line.strip().startswith("||"):
+ elif in_table and not line.strip().startswith("||"):
new_content.append("\n")
in_table = False
@@ -165,6 +165,8 @@ def WikiToMD(content):
# an empty line. wikiformat uses both '*' and '-' for its
# lists. However, markdown only supports '-'.
#
+ if line.strip().startswith("- "):
+ line = line.replace("-", "*", 1)
if line.startswith('* '):
if not in_list:
new_content.append("\n")