From 2e141341684eb610834db92693d715f3fd01d0dd Mon Sep 17 00:00:00 2001 From: Akash Deshpande Date: Sat, 13 Aug 2016 12:28:45 -0400 Subject: 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 Tested-by: jan iversen --- to-wiki/wikiconv2.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'to-wiki') 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 + '
' - 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 -- cgit