[yelp-xsl] db2html-block: Handle literallayout with class="monospaced"



commit adc070c82160de45f8a186fd0082b7ff5223b0e6
Author: Shaun McCance <shaunm gnome org>
Date:   Wed Feb 29 13:11:45 2012 -0500

    db2html-block: Handle literallayout with class="monospaced"

 xslt/docbook/html/db2html-block.xsl |    9 ++++++++-
 1 files changed, 8 insertions(+), 1 deletions(-)
---
diff --git a/xslt/docbook/html/db2html-block.xsl b/xslt/docbook/html/db2html-block.xsl
index ba29650..2e1ed2c 100644
--- a/xslt/docbook/html/db2html-block.xsl
+++ b/xslt/docbook/html/db2html-block.xsl
@@ -511,7 +511,14 @@ syntax highlighting support based on the #{language} attribute of ${node}.
 
 <!-- = literallayout = -->
 <xsl:template match="literallayout | db:literallayout">
-  <xsl:call-template name="db2html.block"/>
+  <xsl:choose>
+    <xsl:when test="@class = 'monospaced'">
+      <xsl:call-template name="db2html.pre"/>
+    </xsl:when>
+    <xsl:otherwise>
+      <xsl:call-template name="db2html.block"/>
+    </xsl:otherwise>
+  </xsl:choose>
 </xsl:template>
 
 <!-- = note = -->



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]