]> granicus.if.org Git - docbook-dsssl/commitdiff
Fix bug #1363 synopsis in variablelist term mangles line breaks.
authorBob Stayton <bobs@sagehill.net>
Mon, 24 Aug 2015 20:23:37 +0000 (20:23 +0000)
committerBob Stayton <bobs@sagehill.net>
Mon, 24 Aug 2015 20:23:37 +0000 (20:23 +0000)
xsl/manpages/block.xsl
xsl/manpages/lists.xsl

index 74f809eeeb7f1521fc530864692301c0798234c6..d90def216a067b73087075f01dd47713ea84d985 100644 (file)
       and not(substring(local-name(..),
       string-length(local-name(..))-7) = 'synopsis')
       and not(ancestor::*[local-name() = 'refsynopsisdiv'])
+      and not(ancestor::*[local-name() = 'term'])
       ">
       <xsl:text>Yes</xsl:text>
     </xsl:if>
index bcab51f1097c11d03cc1a9aab1d2bd935ccad277..0c359649bbb66aa19535204c6a0ae8aea08b6c9f 100644 (file)
     <xsl:variable name="content">
       <xsl:apply-templates/>
     </xsl:variable>
-    <xsl:value-of select="normalize-space($content)"/>
+    <xsl:choose>
+      <!-- don't normalize verbatim synopsis -->
+      <xsl:when test="child::synopsis">
+        <xsl:value-of select="$content"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:value-of select="normalize-space($content)"/>
+      </xsl:otherwise>
+    </xsl:choose>
     <xsl:choose>
       <xsl:when test="position() = last()"/> <!-- do nothing -->
       <xsl:otherwise>