[Libreoffice-commits] core.git: swext/mediawiki

Robert Antoni Buj Gelonch robert.buj at gmail.com
Mon Apr 27 07:08:31 PDT 2015


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

New commits:
commit b32953d19825605ed5d919f515c355a11b9c1e87
Author: Robert Antoni Buj Gelonch <robert.buj at gmail.com>
Date:   Mon Apr 20 22:20:59 2015 +0200

    tdf#75360 tdf#90474 line breaks in exporting to mediawiki
    
    Change-Id: Icb44653a9286c8bfbe912f391f0492fe49498f58
    Reviewed-on: https://gerrit.libreoffice.org/15449
    Reviewed-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>
    Tested-by: Adolfo Jayme Barrientos <fitojb at ubuntu.com>

diff --git a/swext/mediawiki/src/filter/odt2mediawiki.xsl b/swext/mediawiki/src/filter/odt2mediawiki.xsl
index b0bc0500..d8a9fba 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>
 
 	<!-- 
@@ -723,7 +725,7 @@
 		== Paragraphs == 
 	 -->
 
-	<template match="text:p[string-length(.) > 0]">
+	<template match="text:p">
 		<variable name="alignment">
 			<call-template name="mk-style-set">
 				<with-param name="node" select="."/>
@@ -801,7 +803,7 @@
 			-->
 			<choose>
 				<when test="boolean(ancestor::text:list-item)">
-					<text><br/> </text>
+					<text><br/></text>
 				</when>
 				<when test="$code">
 					<variable name="style-right">
@@ -839,12 +841,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>


More information about the Libreoffice-commits mailing list