Fix double-spaced code samples in the Docbook transform output.
authorDean Camera <dean@fourwalledcubicle.com>
Fri, 23 Aug 2013 21:27:09 +0000 (23:27 +0200)
committerDean Camera <dean@fourwalledcubicle.com>
Fri, 23 Aug 2013 21:27:09 +0000 (23:27 +0200)
LUFA/StudioIntegration/HV1/lufa_docbook_transform.xslt

index f1e9239..2ebda6d 100644 (file)
 
        <xsl:template match="programlisting">
                <programlisting language="c">
-                       <xsl:apply-templates/>
+                       <xsl:for-each select="codeline[position() > 1 or highlight]">
+                               <xsl:apply-templates select="."/>
+                               <xsl:text>&#10;</xsl:text>
+                       </xsl:for-each>
                </programlisting>
        </xsl:template>
 
-       <xsl:template match="codeline">
-               <xsl:apply-templates/>
-               <xsl:text>&#10;</xsl:text>
-       </xsl:template>
-
-       <xsl:template match="codeline[last()]">
-               <xsl:if test="text() != '*'">
-                       <xsl:apply-templates/>
-               </xsl:if>
-       </xsl:template>
-
        <xsl:template match="highlight">
                <emphasis role="{@class}">
                        <xsl:apply-templates/>