From dd730c31937e547dae1f49a7ff6814f0d62b6c60 Mon Sep 17 00:00:00 2001 From: Jan Holesovsky Date: Thu, 11 Nov 2010 23:58:19 +0100 Subject: wikihelp: Correct handling of paragraphs in tables. --- helpcontent2/to-wiki/wikiconv2.py | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'helpcontent2/to-wiki') diff --git a/helpcontent2/to-wiki/wikiconv2.py b/helpcontent2/to-wiki/wikiconv2.py index 167479a6dc..c96a945428 100755 --- a/helpcontent2/to-wiki/wikiconv2.py +++ b/helpcontent2/to-wiki/wikiconv2.py @@ -289,8 +289,13 @@ class ctabcell: def get_all(self): text = "" + first = True for i in self.objects: - text = text + i.get_all() + if first: + text = i.get_all() + first = False + else: + text = text + "\n" + i.get_all() return text def get_curobj(self): @@ -346,17 +351,17 @@ class ctable: pass def get_all(self): - text = '{| border="1"' # + ' align="left"' + text = '{| border="1"\n' # + ' align="left"' if len(self.header): # text = text + "\n|+ caption" - text = text +"\n|-" + text = text +"|-\n" for i in self.header: - text = text + '\n! scope="col" | ' + i.get_all() + text = text + '! scope="col" | ' + i.get_all() for i in self.content: - text = text + "\n|-" + text = text + "|-\n" for j in i: - text = text + "\n| "+j.get_all() - text = text + "\n|}" + text = text + "| "+j.get_all() + text = text + "|}\n" return text def print_all(self): -- cgit