| 1 | # Source: <https://sources.debian.org/patches/docbook-utils/0.6.14-4/bug_528334.patch/>
|
| 2 |
|
| 3 | Description: incorrectly strips whitespace (patch included)
|
| 4 | In the previous upload, docbook2man was patched to escape the special
|
| 5 | characters . and ' at the beginning of a line (see #399947).
|
| 6 | Unfortunately that patch was incorrect -- as well as escaping the special
|
| 7 | characters, it also removes all whitespace from the beginning of
|
| 8 | affected lines. As a result, if you are in a block where whitespace
|
| 9 | matters (such as <screen>...</screen>) then the output is now incorrect.
|
| 10 |
|
| 11 | This is very easy to fix -- just match the whitespace and preserve it,
|
| 12 | instead of tossing it away. The full patch (just two lines) is included
|
| 13 | below.
|
| 14 | Author: Ben Burton <[email protected]>
|
| 15 | Forwarded: not-needed
|
| 16 | Bug-Debian: http://bugs.debian.org/528334
|
| 17 |
|
| 18 | Edit by Bruno Victal <[email protected]>:
|
| 19 | Patch was edited so that it could be applied against the original
|
| 20 | docbook-utils-0.6.14 sources.
|
| 21 |
|
| 22 | Index: docbook-utils-0.6.14/helpers/docbook2man-spec.pl
|
| 23 | ===================================================================
|
| 24 | |
| 25 | |
| 26 | @@ -1212,8 +1212,8 @@
|
| 27 | $_[0] =~ s/\\/\\\\/g;
|
| 28 |
|
| 29 | # Escape dots and single quotes in column 1
|
| 30 | - $_[0] =~ s/^\./\\\&\./;
|
| 31 | - $_[0] =~ s/^\'/\\\&\'/;
|
| 32 | + $_[0] =~ s/^([ \t]*)\./$1\\\&\./;
|
| 33 | + $_[0] =~ s/^([ \t]*)\'/$1\\\&\'/;
|
| 34 |
|
| 35 | # In non-'pre'-type elements:
|
| 36 | if(!$nocollapse_whitespace) {
|