From c439a6557336e6971688f2a4cc21e0fc2d43a1ed Mon Sep 17 00:00:00 2001 From: Rob Austein Date: Tue, 19 Mar 2019 18:03:25 +0000 Subject: Notes on table conversion. --- tools/trac2md.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/tools/trac2md.py b/tools/trac2md.py index ab0bf79..85fdd79 100755 --- a/tools/trac2md.py +++ b/tools/trac2md.py @@ -128,6 +128,26 @@ def WikiToMD(content): code_block = False line = line.replace("}}}", "```") if not code_block: + # + # Want to convert tables. References: + # https://github.github.com/gfm/#tables-extension- + # https://permatrac.noc.ietf.org/wiki/WikiFormatting#Tables + # + # Table start: line containing "||" + # Table end: blank line? + # + # Figuring out whether there's a real header line is fun, + # trac doesn't require one, markdown does. Guess we can + # add a dummy header if no better idea. Markdown requires + # delimiter line, which we add immediately after the + # header, both appear to be mandatory. Trac can have + # label cells anywhere, not just in header, might need to + # add "*" to those or just ignore the issue. + # Justification we can sort of figure out from the header, + # if the rows do anything different, ouch, because + # markdown specifies in delimiter line. + # + # # Convert bullet lists. The start and end of a list needs # an empty line. wikiformat uses both '*' and '-' for its -- cgit v1.2.3