[Cryptech-Commits] [wiki] 13/75: Table fixes, possibly incomplete
git at cryptech.is
git at cryptech.is
Fri Oct 8 18:51:39 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 576a71b2754d93055709520eb48ea713b8b9e989
Author: Rob Austein <sra at hactrn.net>
AuthorDate: Thu Mar 21 13:33:33 2019 +0000
Table fixes, possibly incomplete
---
tools/trac2md.py | 6 ++++--
1 file 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")
More information about the Commits
mailing list