helpers/mimeTextPart.xsl
changeset 99 dd361cf60002
parent 97 7520a9246ff5
child 110 c81406884e16
     1.1 --- a/helpers/mimeTextPart.xsl	Tue Oct 18 22:50:39 2011 +0200
     1.2 +++ b/helpers/mimeTextPart.xsl	Tue Oct 18 22:55:43 2011 +0200
     1.3 @@ -211,11 +211,11 @@
     1.4  	
     1.5  	
     1.6  	<xsl:template match="text()[not(parent::h:pre)]">
     1.7 -		<xsl:if test="matches(., '^\s')">
     1.8 +		<xsl:if test="matches(., '^\s') and preceding-sibling::node()">
     1.9  			<xsl:text> </xsl:text>
    1.10  		</xsl:if>
    1.11  		<xsl:value-of select="normalize-space(.)"/>
    1.12 -		<xsl:if test="matches(., '\s$')">
    1.13 +		<xsl:if test="matches(., '\s$') and following-sibling::node()">
    1.14  			<xsl:text> </xsl:text>
    1.15  		</xsl:if>
    1.16  	</xsl:template>