summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtools/trac2md.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/tools/trac2md.py b/tools/trac2md.py
index 5f440d3..628f0c0 100755
--- a/tools/trac2md.py
+++ b/tools/trac2md.py
@@ -163,17 +163,15 @@ def WikiToMD(content):
#
# Convert bullet lists. The start and end of a list needs
# an empty line. wikiformat uses both '*' and '-' for its
- # lists. However, markdown only supports '-'.
+ # lists. However, markdown only supports '*'.
#
- if line.strip().startswith("- "):
- line = line.replace("-", "*", 1)
- if line.startswith('* '):
+ if line.startswith('- '):
if not in_list:
new_content.append("\n")
in_list = True
line = line[1:]
- line = '-%s' % (line)
- elif line.startswith('- '):
+ line = '*%s' % (line)
+ elif line.startswith('* '):
# No need to modify the line, just add the new line
if not in_list:
new_content.append("\n")
@@ -192,7 +190,7 @@ def WikiToMD(content):
prev_indent = indent
# Set the proper indentation for markdown
- line = ('%s-%s' % (' ' * nested_level,
+ line = ('%s*%s' % (' ' * nested_level,
nested_line[1:]))
else:
if in_list: