From 1a8b1566f19578d6bd02ecdb753b8b8158c723bf Mon Sep 17 00:00:00 2001
From: Hans Bolinder <hasse@erlang.org>
Date: Tue, 27 Sep 2011 14:47:13 +0200
Subject: Improve indentation in manpages

The indentation after `Warning:' and `Note:' in manpages has been
improved.
---
 lib/erl_docgen/priv/xsl/db_man.xsl | 28 ++++++++++++++++++++++++++--
 1 file changed, 26 insertions(+), 2 deletions(-)

diff --git a/lib/erl_docgen/priv/xsl/db_man.xsl b/lib/erl_docgen/priv/xsl/db_man.xsl
index c7efced3d2..1df96caa36 100644
--- a/lib/erl_docgen/priv/xsl/db_man.xsl
+++ b/lib/erl_docgen/priv/xsl/db_man.xsl
@@ -512,18 +512,42 @@
 
   <!-- Note -->
   <xsl:template match="note">
-    <xsl:text>&#10;.SS Note:</xsl:text>
+    <xsl:text>&#10;.LP&#10;</xsl:text>
+    <xsl:text>&#10;.RS -4</xsl:text>
+    <xsl:text>&#10;.B&#10;</xsl:text>
+    <xsl:text>Note:</xsl:text>
+    <xsl:text>&#10;.RE</xsl:text>
     <xsl:apply-templates/>
     <xsl:text>&#10;</xsl:text>
   </xsl:template>
 
   <!-- Warning -->
   <xsl:template match="warning">
-    <xsl:text>&#10;.SS Warning:</xsl:text>
+    <xsl:text>&#10;.LP&#10;</xsl:text>
+    <xsl:text>&#10;.RS -4</xsl:text>
+    <xsl:text>&#10;.B&#10;</xsl:text>
+    <xsl:text>Warning:</xsl:text>
+    <xsl:text>&#10;.RE</xsl:text>
     <xsl:apply-templates/>
     <xsl:text>&#10;</xsl:text>
   </xsl:template>
 
+  <xsl:template match="warning/p | note/p">
+    <xsl:variable name="content">
+      <xsl:text>&#10;</xsl:text>
+      <xsl:apply-templates/>
+    </xsl:variable>
+    <xsl:choose>
+      <xsl:when test="position() = 1">
+        <xsl:value-of select="$content"/>
+      </xsl:when>
+      <xsl:otherwise>
+        <xsl:text>&#10;.LP</xsl:text>
+        <xsl:value-of select="$content"/>
+      </xsl:otherwise>
+    </xsl:choose>
+  </xsl:template>
+
  <!-- Paragraph -->
   <xsl:template match="p">
     <xsl:text>&#10;.LP&#10;</xsl:text>
-- 
cgit v1.2.3