# HG changeset patch
# User František Kučera <franta-hg@frantovo.cz>
# Date 1318971343 -7200
# Node ID dd361cf60002ca6999ac9589804c5c7a25cd02e7
# Parent  7634720578194aea09cba6ff8841a0be5dd3062c
Drupal: text/plain – odstranění přebytečných mezer na začátcích a koncích odstavců (oprava).

diff -r 763472057819 -r dd361cf60002 helpers/mimeTextPart.xsl
--- a/helpers/mimeTextPart.xsl	Tue Oct 18 22:50:39 2011 +0200
+++ b/helpers/mimeTextPart.xsl	Tue Oct 18 22:55:43 2011 +0200
@@ -211,11 +211,11 @@
 	
 	
 	<xsl:template match="text()[not(parent::h:pre)]">
-		<xsl:if test="matches(., '^\s')">
+		<xsl:if test="matches(., '^\s') and preceding-sibling::node()">
 			<xsl:text> </xsl:text>
 		</xsl:if>
 		<xsl:value-of select="normalize-space(.)"/>
-		<xsl:if test="matches(., '\s$')">
+		<xsl:if test="matches(., '\s$') and following-sibling::node()">
 			<xsl:text> </xsl:text>
 		</xsl:if>
 	</xsl:template>