Package: groff / 1.22.4-6

mdoc-Lk-arguments.patch Patch series | download
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
From 77033507090e50b10e5712fb3c1ca998152746c2 Mon Sep 17 00:00:00 2001
From: Ingo Schwarze <schwarze@openbsd.org>
Date: Sat, 12 Jan 2019 17:33:40 +0100
Subject: Correctly handle groff_mdoc(7) .Lk arguments starting with a dot.

* tmac/doc.tmac-u: Each argument to the .Lk macro is printed
  on its own roff input line.  If it happens to start with a dot
  or apostroph, it was misinterpreted as a request or macro.
  Force it to be treated as text by adding "\&" in front of it.

Bug reported by Jason McIntyre <jmc at OpenBSD>.

Origin: upstream, https://git.savannah.gnu.org/cgit/groff.git/commit/?id=76e4db6e839904d2e2a28b29b483678214598f3b
Bug-Debian: https://bugs.debian.org/946868
Last-Update: 2019-12-17

Patch-Name: mdoc-Lk-arguments.patch
---
 tmac/doc.tmac-u | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tmac/doc.tmac-u b/tmac/doc.tmac-u
index f172fd89..70236c04 100644
--- a/tmac/doc.tmac-u
+++ b/tmac/doc.tmac-u
@@ -6485,10 +6485,11 @@
 .  if (\n[doc-arg-ptr] <= \n[doc-lasttext-Lk]) \{\
 .    nop \*[doc-Em-font]\c
 .    while (\n[doc-arg-ptr] < \n[doc-lasttext-Lk]) \{\
-.      nop \*[doc-arg\n[doc-arg-ptr]]
+.      nop \&\*[doc-arg\n[doc-arg-ptr]]
 .      nr doc-arg-ptr +1
 .    \}
-.    nop \*[doc-arg\n[doc-arg-ptr]]\f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]:
+.    nop \&\*[doc-arg\n[doc-arg-ptr]]\c
+.    nop \f[\n[doc-curr-font]]\s[\n[doc-curr-size]u]:
 .    nr doc-arg-ptr +1
 .  \}
 .
@@ -6498,7 +6499,7 @@
 .
 .  \" Print the delimiters, if any.
 .  while (\n[doc-arg-ptr] <= \n[doc-arg-limit]) \{\
-.    nop \*[doc-arg\n[doc-arg-ptr]]\c
+.    nop \&\*[doc-arg\n[doc-arg-ptr]]\c
 .    nr doc-arg-ptr +1
 .  \}
 .  nop \&