From a20be95dec7797c55257792a32b6b39bdbdfe595 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Tue, 30 May 2017 16:22:03 +0000 Subject: Macro argument quoting does not prevent recognition of punctuation and of called macros. This bug affects almost all macros, and fixing it simplifies the code. It is amazing that the bogus ARGS_QWORD feature got implemented in the first place, and then carrier along for more than eight years without anybody ever noticing that it was pointless. Reported by Leah Neukirchen , found on Void Linux. --- regress/mdoc/Em/punct.in | 13 +++++++------ regress/mdoc/Em/punct.out_ascii | 2 +- regress/mdoc/Em/punct.out_lint | 1 + regress/mdoc/Em/punct.out_markdown | 3 ++- 4 files changed, 11 insertions(+), 8 deletions(-) (limited to 'regress/mdoc/Em') diff --git a/regress/mdoc/Em/punct.in b/regress/mdoc/Em/punct.in index b49ca505..a8e012e7 100644 --- a/regress/mdoc/Em/punct.in +++ b/regress/mdoc/Em/punct.in @@ -7,7 +7,7 @@ .Sh DESCRIPTION Leading punctuation: .Em ( b -.Em [ b +.Em "[" b .Em | b .Em . b .Em , b @@ -16,7 +16,7 @@ Leading punctuation: .Em ? b .Em ! b .Em ) b -.Em ] b +.Em "]" b .Pp Trailing punctuation: .Em a ( @@ -28,17 +28,17 @@ Trailing punctuation: .Em a : .Em a ? .Em a ! -.Em a ) +.Em a ")" .Em a ] .Pp Middle punctuation: .Em a ( b .Em a [ b -.Em a | b +.Em a "|" b .Em a . b .Em a , b .Em a ; b -.Em a : b +.Em a ":" b .Em a ? b .Em a ! b .Em a ) b @@ -78,5 +78,6 @@ Multiple punctuation: .Em [ ( arg ) ] . .Pp Quoted: -.Em "a . b Nm" +.Em "a . b Nm" "Sy" bold .Em ". b Nm" +.Em "." diff --git a/regress/mdoc/Em/punct.out_ascii b/regress/mdoc/Em/punct.out_ascii index 4396e669..e0f60dbe 100644 --- a/regress/mdoc/Em/punct.out_ascii +++ b/regress/mdoc/Em/punct.out_ascii @@ -21,6 +21,6 @@ DDEESSCCRRIIPPTTIIOONN Multiple punctuation: [(_a_r_g)]. - Quoted: _a _. _b _N_m _. _b _N_m + Quoted: _a _. _b _N_m bboolldd _. _b _N_m . OpenBSD November 17, 2014 OpenBSD diff --git a/regress/mdoc/Em/punct.out_lint b/regress/mdoc/Em/punct.out_lint index 7d16f436..cfcc04a7 100644 --- a/regress/mdoc/Em/punct.out_lint +++ b/regress/mdoc/Em/punct.out_lint @@ -22,3 +22,4 @@ mandoc: punct.in:70:7: WARNING: skipping empty macro: Em mandoc: punct.in:71:7: WARNING: skipping empty macro: Em mandoc: punct.in:74:7: WARNING: skipping empty macro: Em mandoc: punct.in:75:7: WARNING: skipping empty macro: Em +mandoc: punct.in:83:2: WARNING: skipping empty macro: Em diff --git a/regress/mdoc/Em/punct.out_markdown b/regress/mdoc/Em/punct.out_markdown index 5d3e8524..6cf5402d 100644 --- a/regress/mdoc/Em/punct.out_markdown +++ b/regress/mdoc/Em/punct.out_markdown @@ -79,7 +79,8 @@ Multiple punctuation: \[(*arg*)]. Quoted: -*a . b Nm* +*a . b Nm* **bold** *. b Nm* +. OpenBSD - November 17, 2014 -- cgit v1.2.3-56-ge451