summaryrefslogtreecommitdiff
path: root/helpcontent2/to-wiki/wikiconv2.py
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2010-12-09 13:13:29 +0100
committerJan Holesovsky <kendy@suse.cz>2010-12-09 13:13:29 +0100
commit00d5b2ca4802ba02e4003a0b98f01f021ad6dc9f (patch)
treec7c0f21a35f938e8b658881ece8ee22f34f76b18 /helpcontent2/to-wiki/wikiconv2.py
parentde09480929be4ad1bb6b731183732cfd3338407f (diff)
wikihelp: No \n in listitems.
Diffstat (limited to 'helpcontent2/to-wiki/wikiconv2.py')
-rwxr-xr-xhelpcontent2/to-wiki/wikiconv2.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/helpcontent2/to-wiki/wikiconv2.py b/helpcontent2/to-wiki/wikiconv2.py
index d440328f19..464c36512e 100755
--- a/helpcontent2/to-wiki/wikiconv2.py
+++ b/helpcontent2/to-wiki/wikiconv2.py
@@ -994,7 +994,8 @@ class Paragraph(ElementBase):
pass
def char_data(self, parser, data):
- if self.role == 'paragraph' or self.role == 'heading':
+ if self.role == 'paragraph' or self.role == 'heading' or \
+ self.role == 'listitem':
if data != '' and data[0] == ' ':
data = ' ' + data.lstrip()
data = data.replace('\n', ' ')
@@ -1008,7 +1009,7 @@ class Paragraph(ElementBase):
attrs = {'role':self.role,
'level':self.level}
self.localized_objects = get_localized_objects(parser, loc_text, attrs)
- else:
+ elif len(data):
self.objects.append(Text(data))
def get_all(self):
@@ -1077,7 +1078,7 @@ class ListItemParagraph(Paragraph):
def __init__(self, attrs, parent):
Paragraph.__init__(self, attrs, parent)
- self.role = 'null'
+ self.role = 'listitem'
class XhpParser:
def __init__(self, filename, follow_embed, embedding_app, wiki_page_name):