[Cryptech-Commits] [wiki] 14/75: Gogs seems not to like "-" as start of list entry

git at cryptech.is git at cryptech.is
Fri Oct 8 18:51:40 UTC 2021


This is an automated email from the git hooks/post-receive script.

sra at hactrn.net pushed a commit to branch production
in repository wiki.

commit 7ef4f4f76f22cbf692069ab074359db072410673
Author: Rob Austein <sra at hactrn.net>
AuthorDate: Thu Mar 21 14:06:56 2019 +0000

    Gogs seems not to like "-" as start of list entry
---
 tools/trac2md.py | 12 +++++-------
 1 file 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:



More information about the Commits mailing list