From 7ef4f4f76f22cbf692069ab074359db072410673 Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Thu, 21 Mar 2019 14:06:56 +0000 Subject: Gogs seems not to like "-" as start of list entry --- tools/trac2md.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'tools') 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: -- cgit v1.2.3