summaryrefslogtreecommitdiff
path: root/to-wiki
diff options
context:
space:
mode:
authorAkash Deshpande <fastakash@gmail.com>2016-08-13 12:28:45 -0400
committerjan iversen <jani@documentfoundation.org>2016-08-17 06:47:20 +0000
commit2e141341684eb610834db92693d715f3fd01d0dd (patch)
treee0f352ed7ebf9bb6ea7660d7259c633390e79562 /to-wiki
parent053c67aeb4049a175eda8dc4a1910516f58ce7b4 (diff)
tdf#94553 fix nested lists in wikihelp
The problem was that only the first element in a nested list was getting the extra '#' character Added a re.sub statment to ensure all elements inside a nested list have this to ensure proper display Also backing out temporary/FIXME changes in the xhp files. The run is now free of warnings with the desired changes showing up for 'Using Gluepoints' page, which has a nested list Change-Id: I4009408ee11e191cbd5e1560ca1d08f3e7b5c630 Reviewed-on: https://gerrit.libreoffice.org/28107 Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
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