summaryrefslogtreecommitdiff
path: root/user/docbook2x/refentry-whitespace.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-01-11 21:03:45 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-01-11 21:03:45 +0000
commitb8a4be9e71e9a8768cfa344b64bae186690a5fb1 (patch)
tree464e5f1e1eb69df9d8daaf5d8d59e8b62444fdf4 /user/docbook2x/refentry-whitespace.patch
parent4b5db770f22714a3d481f3ab091e28d140e5d053 (diff)
downloadpackages-b8a4be9e71e9a8768cfa344b64bae186690a5fb1.tar.gz
packages-b8a4be9e71e9a8768cfa344b64bae186690a5fb1.tar.bz2
packages-b8a4be9e71e9a8768cfa344b64bae186690a5fb1.tar.xz
packages-b8a4be9e71e9a8768cfa344b64bae186690a5fb1.zip
user/docbook2x: new package
Diffstat (limited to 'user/docbook2x/refentry-whitespace.patch')
-rw-r--r--user/docbook2x/refentry-whitespace.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/user/docbook2x/refentry-whitespace.patch b/user/docbook2x/refentry-whitespace.patch
new file mode 100644
index 000000000..d80ab18b0
--- /dev/null
+++ b/user/docbook2x/refentry-whitespace.patch
@@ -0,0 +1,34 @@
+# Peter Eisentraut reported a regression in the whitespace handling of
+# refentrytitle content during filename creation: http://bugs.debian.org/420153
+# The problem is docbook2x replaces all spaces with underlines and then tries
+# to normalize the result. A linebreak with additional whitespaces results in
+# manpage names like 'foo_ ____bar.9'.
+
+diff -urNad docbook2x-0.8.8~/xslt/man/manpage.xsl docbook2x-0.8.8/xslt/man/manpage.xsl
+--- docbook2x-0.8.8~/xslt/man/manpage.xsl 2006-04-20 15:45:55.000000000 +0200
++++ docbook2x-0.8.8/xslt/man/manpage.xsl 2007-04-20 16:19:28.000000000 +0200
+@@ -30,7 +30,7 @@
+
+ <xsl:template name="manpage-filename">
+ <xsl:param name="filename" />
+- <xsl:value-of select="normalize-space(translate($filename, &quot; /&quot;, &quot;__&quot;))" />
++ <xsl:value-of select="translate(normalize-space($filename), ' /', '__')" />
+ </xsl:template>
+
+
+diff -urNad docbook2x-0.8.8~/xslt/man/refentry.xsl docbook2x-0.8.8/xslt/man/refentry.xsl
+--- docbook2x-0.8.8~/xslt/man/refentry.xsl 2006-04-21 04:39:55.000000000 +0200
++++ docbook2x-0.8.8/xslt/man/refentry.xsl 2007-04-20 16:21:53.000000000 +0200
+@@ -38,7 +38,11 @@
+ <xsl:template name="refentry-filename">
+ <xsl:param name="title" />
+
+- <xsl:variable name="title2" select="translate($title, &quot; /&quot;, &quot;__&quot;)" />
++ <xsl:variable name="title2">
++ <xsl:call-template name="manpage-filename">
++ <xsl:with-param name="filename" select="$title" />
++ </xsl:call-template>
++ </xsl:variable>
+
+ <!-- not using gentext here since man page names tend not to have
+ accented chars / non-Latin chars ...