[xml/sgml-pkgs] Bug#528334: docbook-utils: incorrectly strips whitespace (patch included)
Ben Burton
bab at debian.org
Tue May 12 08:25:22 UTC 2009
Package: docbook-utils
Version: 0.6.14-1.1
Severity: normal
Tags: patch
Hi,
In the previous upload, docbook2man was patched to escape the special
characters . and ' at the beginning of a line (see #399947).
Unfortunately that patch was incorrect -- as well as escaping the special
characters, it also removes all whitespace from the beginning of
affected lines. As a result, if you are in a block where whitespace
matters (such as <screen>...</screen>) then the output is now incorrect.
This is very easy to fix -- just match the whitespace and preserve it,
instead of tossing it away. The full patch (just two lines) is included
below.
Thanks - Ben.
--- docbook2man-spec.pl.old 2009-05-12 14:09:13.000000000 +1000
+++ docbook2man-spec.pl 2009-05-12 14:12:57.000000000 +1000
@@ -1199,8 +1199,8 @@
$_[0] =~ s/\\/\\\\/g;
# Escape dots and single quotes in column 1
- $_[0] =~ s/^[ \t]*\./\\\&\./;
- $_[0] =~ s/^[ \t]*\'/\\\&\'/;
+ $_[0] =~ s/^([ \t]*)\./$1\\\&\./;
+ $_[0] =~ s/^([ \t]*)\'/$1\\\&\'/;
# In non-'pre'-type elements:
if(!$nocollapse_whitespace) {
More information about the debian-xml-sgml-pkgs
mailing list