[Libreoffice-commits] help.git: source/text to-wiki/wikiconv2.py

Akash Deshpande fastakash at gmail.com
Wed Aug 17 06:47:44 UTC 2016


 source/text/scalc/01/05120000.xhp           |    2 --
 source/text/simpress/guide/gluepoints.xhp   |    4 ++--
 source/text/swriter/librelogo/LibreLogo.xhp |    4 ++--
 to-wiki/wikiconv2.py                        |    7 ++++++-
 4 files changed, 10 insertions(+), 7 deletions(-)

New commits:
commit 2e141341684eb610834db92693d715f3fd01d0dd
Author: Akash Deshpande <fastakash at gmail.com>
Date:   Sat Aug 13 12:28:45 2016 -0400

    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 at documentfoundation.org>
    Tested-by: jan iversen <jani at documentfoundation.org>

diff --git a/source/text/scalc/01/05120000.xhp b/source/text/scalc/01/05120000.xhp
index 59a3b35..49faa3a 100644
--- a/source/text/scalc/01/05120000.xhp
+++ b/source/text/scalc/01/05120000.xhp
@@ -49,7 +49,6 @@
       </listitem>
       <listitem>
           <paragraph xml-lang="en-US" id="par_id31494134" role="listitem">If you select <emph>Cell value is</emph>:</paragraph>
-          <switch select="sys"><comment>FIXME: Hack to get a nested list</comment><default>
           <list type="unordered">
           <listitem>
               <paragraph xml-lang="en-US" id="par_id31494135" role="listitem">Select a condition in the drop down list for the format to be applied to the selected cells and enter the value.</paragraph>
@@ -64,7 +63,6 @@
               <paragraph xml-lang="en-US" id="par_id31494138" role="listitem">In the <emph>Range</emph> field, define the range of cells concerned by the conditional formatting. Click on the <emph>Shrink</emph> button to minimize the dialog box. Click again on the button to come back to the dialog box once the range is selected.</paragraph>
           </listitem>
           </list>
-          </default></switch>
       </listitem>
       <listitem>
       <paragraph xml-lang="en-US" id="par_id31494139" role="listitem">If you select <emph>Formula is</emph> as a reference, enter a cell reference.
diff --git a/source/text/simpress/guide/gluepoints.xhp b/source/text/simpress/guide/gluepoints.xhp
index 49975d3..695e2a3 100644
--- a/source/text/simpress/guide/gluepoints.xhp
+++ b/source/text/simpress/guide/gluepoints.xhp
@@ -37,7 +37,7 @@
 <listitem>
 <paragraph role="paragraph" id="par_id091920080304108" xml-lang="en-US" l10n="NEW">Do one of the following to get existing glue points visible for all elements:</paragraph>
 </listitem>
-<listitem><switch select="sys"><comment>FIXME: Hack to get a nested list</comment><default>
+<listitem>
 <list type="ordered">
 <listitem>
 <paragraph role="paragraph" id="par_id0919200803041082" xml-lang="en-US" l10n="NEW">Click the <emph>Glue Point</emph> icon on the Drawing toolbar.</paragraph>
@@ -46,7 +46,7 @@
 <paragraph role="paragraph" id="par_id0919200803041186" xml-lang="en-US" l10n="NEW">Choose <item type="menuitem">Edit - Glue Points</item>.</paragraph>
 </listitem>
 </list>
-</default></switch></listitem>
+</listitem>
 <listitem>
 <paragraph role="paragraph" id="par_id0919200803041160" xml-lang="en-US" l10n="NEW">Click the <emph>Insert Glue Point</emph> icon on the Gluepoints toolbar.</paragraph>
 </listitem>
diff --git a/source/text/swriter/librelogo/LibreLogo.xhp b/source/text/swriter/librelogo/LibreLogo.xhp
index a81766e..e131f00 100644
--- a/source/text/swriter/librelogo/LibreLogo.xhp
+++ b/source/text/swriter/librelogo/LibreLogo.xhp
@@ -59,7 +59,7 @@
     <listitem>
         <paragraph role="listitem" xml-lang="en-US" id="par_490">Program blocks and lists are different</paragraph>
     </listitem>
-    <listitem><switch select="sys"><comment>FIXME: Hack to get a nested list</comment><default>
+    <listitem>
         <list type="unordered">
             <listitem>
                 <paragraph role="listitem" xml-lang="en-US" id="par_500">Program blocks need space or new line at parenthesization: REPEAT 10 [ FORWARD 10 LEFT 36 ]</paragraph>
@@ -68,7 +68,7 @@
                 <paragraph role="listitem" xml-lang="en-US" id="par_510">Lists need close parenthesization: POSITION [0, 0], and not POSITION [ 0, 0 ]</paragraph>
             </listitem>
         </list>
-    </default></switch></listitem>
+    </listitem>
     <listitem>
         <paragraph role="listitem" xml-lang="en-US" id="par_520">1-line function declarations are not supported (TO and END need new lines).</paragraph>
     </listitem>
diff --git a/to-wiki/wikiconv2.py b/to-wiki/wikiconv2.py
index 5796ffa..f6569b8 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


More information about the Libreoffice-commits mailing list