swext/mediawiki/src/filter/odt2mediawiki.xsl |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

New commits:
commit 363afdf0e937afb179af3819276c6023c48f2b49
Author: Robert Antoni Buj Gelonch <[email protected]>
Date:   Thu Apr 23 17:59:14 2015 +0200

    tdf#75360 tdf#90474 line breaks in exporting to mediawiki
    
    Change-Id: I1a5276600cf0dd00d02f6278c49dd16f51131130
    Reviewed-on: https://gerrit.libreoffice.org/15496
    Reviewed-by: Adolfo Jayme Barrientos <[email protected]>
    Tested-by: Adolfo Jayme Barrientos <[email protected]>

diff --git a/swext/mediawiki/src/filter/odt2mediawiki.xsl 
b/swext/mediawiki/src/filter/odt2mediawiki.xsl
index 44646b1..7198a1f 100644
--- a/swext/mediawiki/src/filter/odt2mediawiki.xsl
+++ b/swext/mediawiki/src/filter/odt2mediawiki.xsl
@@ -285,6 +285,7 @@
                        <text> </text>
                        <value-of select="$token"/>
                        <value-of select="$NL"/>
+                       <value-of select="$NL"/>
                </if>
        </template>
 
@@ -293,6 +294,7 @@
                <apply-templates/>
                <text> ==</text>
                <value-of select="$NL"/>
+               <value-of select="$NL"/>
        </template>
 
        <!-- 
@@ -579,7 +581,7 @@
                == Paragraphs == 
         -->
 
-       <template match="text:p[string-length(.) &gt; 0]">
+       <template match="text:p">
                <variable name="style">
                        <call-template name="mk-style-set">
                                <with-param name="node" select="."/>
@@ -627,7 +629,7 @@
                        -->
                        <choose>
                                <when test="boolean(ancestor::text:list-item)">
-                                       <text>&lt;br/&gt; </text>
+                                       <text>&lt;br/&gt;</text>
                                </when>
                                <when test="$code">
                                        <variable name="style-right">
@@ -665,12 +667,13 @@
                                </otherwise>
                        </choose>
                </when>
-               <when test="boolean(./following-sibling::*[1]/self::text:h) or 
boolean(./following-sibling::*[1]/self::table:table) or 
boolean(./following-sibling::*[1]/self::text:bibliography)">
+               <when test="boolean(./following::*[1]/self::text:h) or 
boolean(./following::*[1]/self::table:table) or 
boolean(./following::*[1]/self::text:bibliography)">
                        <!-- Newline before following heading or table. -->
                        <value-of select="$NL"/>
                        <value-of select="$NL"/>
                </when>
-               <when test="./following-sibling::*[1]/self::text:list and 
not(ancestor::text:list-item)">
+               <when test="not(./following-sibling::*[1]) and 
name(./following::*[1])='text:p' and ancestor::text:list-item">
+                       <!-- End of the list -->
                        <value-of select="$NL"/>
                        <value-of select="$NL"/>
                </when>
_______________________________________________
Libreoffice-commits mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to