unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 58fca8bacee803072aab180c4b6d2ebb67e31841 1467 bytes (raw)
name: gnu/packages/patches/docbook-utils-escape-characters.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
 
Description: incorrectly strips whitespace (patch included)
 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.
Author: Ben Burton <bab@debian.org>
Forwarded: not-needed
Bug-Debian: http://bugs.debian.org/528334

Edit by Bruno Victal <mirai@makinata.eu>:
 Patch was edited so that it could be applied against the original
 docbook-utils-0.6.14 sources.

Index: docbook-utils-0.6.14/helpers/docbook2man-spec.pl
===================================================================
--- docbook-utils-0.6.14.orig/helpers/docbook2man-spec.pl	2012-05-09 18:59:42.584774885 +0200
+++ docbook-utils-0.6.14/helpers/docbook2man-spec.pl	2012-05-09 19:00:34.788773002 +0200
@@ -1212,8 +1212,8 @@
 	$_[0] =~ s/\\/\\\\/g;
 
 	# Escape dots and single quotes in column 1
-	$_[0] =~ s/^\./\\\&\./;
-	$_[0] =~ s/^\'/\\\&\'/;
+	$_[0] =~ s/^([ \t]*)\./$1\\\&\./;
+	$_[0] =~ s/^([ \t]*)\'/$1\\\&\'/;
 
 	# In non-'pre'-type elements:
 	if(!$nocollapse_whitespace) {

debug log:

solving 58fca8bace ...
found 58fca8bace in https://yhetil.org/guix-patches/40aa16c4ec5e774fa7ad47a488eb1c89250490b1.1692830149.git.mirai@makinata.eu/ ||
	https://yhetil.org/guix-patches/dd229d3a7357a415c0670e9591ad8c74821b60cb.1695478390.git.mirai@makinata.eu/

applying [1/1] https://yhetil.org/guix-patches/40aa16c4ec5e774fa7ad47a488eb1c89250490b1.1692830149.git.mirai@makinata.eu/
diff --git a/gnu/packages/patches/docbook-utils-escape-characters.patch b/gnu/packages/patches/docbook-utils-escape-characters.patch
new file mode 100644
index 0000000000..58fca8bace

1:14: trailing whitespace.
 
1:31: space before tab in indent.
 	$_[0] =~ s/\\/\\\\/g;
1:32: trailing whitespace.
 
1:33: space before tab in indent.
 	# Escape dots and single quotes in column 1
1:38: trailing whitespace.
 
Checking patch gnu/packages/patches/docbook-utils-escape-characters.patch...
Applied patch gnu/packages/patches/docbook-utils-escape-characters.patch cleanly.
warning: squelched 2 whitespace errors
warning: 7 lines add whitespace errors.

skipping https://yhetil.org/guix-patches/dd229d3a7357a415c0670e9591ad8c74821b60cb.1695478390.git.mirai@makinata.eu/ for 58fca8bace
index at:
100644 58fca8bacee803072aab180c4b6d2ebb67e31841	gnu/packages/patches/docbook-utils-escape-characters.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).