From 64fedf1f3202d1678f15f7992afef6da49eb708e Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Mon, 24 Aug 2020 13:51:42 -0700 Subject: [PATCH] doc: wikiparser: Generate colspec for tables Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- doc/scripts/wikiparser.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/doc/scripts/wikiparser.py b/doc/scripts/wikiparser.py index b202ad8f8..db7a2cf46 100644 --- a/doc/scripts/wikiparser.py +++ b/doc/scripts/wikiparser.py @@ -414,7 +414,10 @@ class Table(Element): def to_docbook(self, context=None): cols = len(self.rows[0]) if self.rows else 0 - xml = f'' + xml = f'' + for number in range(cols): + xml += f'' + xml += '' for row in self.rows: xml += row.to_docbook(context) xml += '' @@ -1502,7 +1505,10 @@ TableItem([Paragraph([PlainText('A')])]), \ TableItem([Paragraph([PlainText('B')])])]), \ TableRow([TableItem([Paragraph([PlainText('1')])]), \ TableItem([Paragraph([PlainText('2')])])])])]) - '\ + '\ +\ +\ +\ \ A\ B\