summaryrefslogtreecommitdiff
path: root/to-wiki
diff options
context:
space:
mode:
Diffstat (limited to 'to-wiki')
-rwxr-xr-xto-wiki/wikiconv2.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/to-wiki/wikiconv2.py b/to-wiki/wikiconv2.py
index 5796ffa51e..f6569b85e2 100755
--- a/to-wiki/wikiconv2.py
+++ b/to-wiki/wikiconv2.py
@@ -673,7 +673,12 @@ class ListItem(ElementBase):
for i in self.objects:
if linebreak:
text = text + '<br/>'
- text = text + i.get_all()
+ ti = i.get_all()
+ # when the object is another list (i.e. nested lists), only the first item
+ # gets the '#' sign in the front by the previous statement
+ # the below re.sub inserts the extra '#' for all additional items of the list
+ ti = re.sub(r'\n\s*#', '\n##', ti)
+ text = text + ti
linebreak = True
return text + postfix