From: schwarze Date: Tue, 30 May 2017 16:21:07 +0000 (+0000) Subject: Macro argument quoting does not prevent recognition of punctuation X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=232c32a3224efab6a63e0d104744cf2df930b405;p=openbsd 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. --- diff --git a/regress/usr.bin/mandoc/mdoc/Ad/font.in b/regress/usr.bin/mandoc/mdoc/Ad/font.in index 104bc194789..df84458b04b 100644 --- a/regress/usr.bin/mandoc/mdoc/Ad/font.in +++ b/regress/usr.bin/mandoc/mdoc/Ad/font.in @@ -6,5 +6,5 @@ .Nd changing fonts inside the address macro .Sh DESCRIPTION normal text -.Ad emphasis\\fBbold\\fPback | after : punctuation +.Ad emphasis\\fBbold\\fPback | after ":" punctuation "Sy" bold trailing text diff --git a/regress/usr.bin/mandoc/mdoc/Ad/font.out_ascii b/regress/usr.bin/mandoc/mdoc/Ad/font.out_ascii index e829efbd6e7..b86ab465203 100644 --- a/regress/usr.bin/mandoc/mdoc/Ad/font.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/Ad/font.out_ascii @@ -4,6 +4,6 @@ NNAAMMEE AAdd--ffoonntt - changing fonts inside the address macro DDEESSCCRRIIPPTTIIOONN - normal text _e_m_p_h_a_s_i_sbboolldd_b_a_c_k | _a_f_t_e_r: _p_u_n_c_t_u_a_t_i_o_n trailing text + normal text _e_m_p_h_a_s_i_sbboolldd_b_a_c_k | _a_f_t_e_r: _p_u_n_c_t_u_a_t_i_o_n bboolldd trailing text OpenBSD November 20, 2014 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Ad/font.out_markdown b/regress/usr.bin/mandoc/mdoc/Ad/font.out_markdown index 365add62cca..ed3b5901ff6 100644 --- a/regress/usr.bin/mandoc/mdoc/Ad/font.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/Ad/font.out_markdown @@ -7,7 +7,7 @@ AD-FONT(1) - General Commands Manual # DESCRIPTION normal text -*emphasis**bold**back* | *after*: *punctuation* +*emphasis**bold**back* | *after*: *punctuation* **bold** trailing text OpenBSD - November 20, 2014 diff --git a/regress/usr.bin/mandoc/mdoc/An/break.in b/regress/usr.bin/mandoc/mdoc/An/break.in index b783b337d59..ff96c5475e6 100644 --- a/regress/usr.bin/mandoc/mdoc/An/break.in +++ b/regress/usr.bin/mandoc/mdoc/An/break.in @@ -7,7 +7,7 @@ .Sh DESCRIPTION inline is the default: .An Kristaps , -.An Ingo , +.An Ingo "," and .An Joerg . empty @@ -39,7 +39,7 @@ trailing .An -nosplit -split bogus .Pp inline: -.An Kristaps , +.An Kristaps "," .An Ingo , and .An Joerg . diff --git a/regress/usr.bin/mandoc/mdoc/Ap/middle.in b/regress/usr.bin/mandoc/mdoc/Ap/middle.in index 03d7b6f95f2..05f73b3c083 100644 --- a/regress/usr.bin/mandoc/mdoc/Ap/middle.in +++ b/regress/usr.bin/mandoc/mdoc/Ap/middle.in @@ -1,4 +1,4 @@ -.Dd September 30, 2011 +.Dd May 21, 2017 .Dt AP-MIDDLE 1 .Os OpenBSD .Sh NAME @@ -6,3 +6,6 @@ .Nd apostrophe in the middle of a macro line .Sh DESCRIPTION .Xr mandoc 1 Ap s +.Pp +punctuation and called macros: +.Sy bold Ap ( "Sy" bold diff --git a/regress/usr.bin/mandoc/mdoc/Ap/middle.out_ascii b/regress/usr.bin/mandoc/mdoc/Ap/middle.out_ascii index c51bd6d89dd..0f687a46faf 100644 --- a/regress/usr.bin/mandoc/mdoc/Ap/middle.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/Ap/middle.out_ascii @@ -6,4 +6,6 @@ NNAAMMEE DDEESSCCRRIIPPTTIIOONN mandoc(1)'s -OpenBSD September 30, 2011 OpenBSD + punctuation and called macros: bboolldd'(bboolldd + +OpenBSD May 21, 2017 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Ap/middle.out_markdown b/regress/usr.bin/mandoc/mdoc/Ap/middle.out_markdown index 9600945b05c..dd14e8e5e85 100644 --- a/regress/usr.bin/mandoc/mdoc/Ap/middle.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/Ap/middle.out_markdown @@ -8,4 +8,7 @@ AP-MIDDLE(1) - General Commands Manual mandoc(1)'s -OpenBSD - September 30, 2011 +punctuation and called macros: +**bold**'(**bold** + +OpenBSD - May 21, 2017 diff --git a/regress/usr.bin/mandoc/mdoc/Aq/empty.in b/regress/usr.bin/mandoc/mdoc/Aq/empty.in index a407855e57c..1fa5a61b50e 100644 --- a/regress/usr.bin/mandoc/mdoc/Aq/empty.in +++ b/regress/usr.bin/mandoc/mdoc/Aq/empty.in @@ -11,4 +11,4 @@ and a full .Aq user@host return path. And another -.Ao full Ac one . +.Ao full Ac one "Sy" bold . diff --git a/regress/usr.bin/mandoc/mdoc/Aq/empty.out_ascii b/regress/usr.bin/mandoc/mdoc/Aq/empty.out_ascii index c587ee51976..236c06253bf 100644 --- a/regress/usr.bin/mandoc/mdoc/Aq/empty.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/Aq/empty.out_ascii @@ -4,6 +4,7 @@ NNAAMMEE AAqq--eemmppttyy - empty implicit enclosure macros DDEESSCCRRIIPPTTIIOONN - An empty <> and a full return path. And another one. + An empty <> and a full return path. And another one + bboolldd. OpenBSD August 6, 2010 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Aq/empty.out_markdown b/regress/usr.bin/mandoc/mdoc/Aq/empty.out_markdown index 27039dd7b5c..dc39648174f 100644 --- a/regress/usr.bin/mandoc/mdoc/Aq/empty.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/Aq/empty.out_markdown @@ -12,6 +12,6 @@ and a full <user@host> return path. And another -<full> one. +<full> one **bold**. OpenBSD - August 6, 2010 diff --git a/regress/usr.bin/mandoc/mdoc/Aq/empty.out_utf8 b/regress/usr.bin/mandoc/mdoc/Aq/empty.out_utf8 index 0ae72b6f239..0a81608b615 100644 --- a/regress/usr.bin/mandoc/mdoc/Aq/empty.out_utf8 +++ b/regress/usr.bin/mandoc/mdoc/Aq/empty.out_utf8 @@ -4,6 +4,7 @@ NNAAMMEE AAqq--eemmppttyy – empty implicit enclosure macros DDEESSCCRRIIPPTTIIOONN - An empty ⟨⟩ and a full ⟨user@host⟩ return path. And another ⟨full⟩ one. + An empty ⟨⟩ and a full ⟨user@host⟩ return path. And another ⟨full⟩ one + bboolldd. OpenBSD August 6, 2010 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Ar/punct.in b/regress/usr.bin/mandoc/mdoc/Ar/punct.in index 963f7535a81..51044001835 100644 --- a/regress/usr.bin/mandoc/mdoc/Ar/punct.in +++ b/regress/usr.bin/mandoc/mdoc/Ar/punct.in @@ -37,3 +37,6 @@ op paren .Ar ( a op bracket .Ar [ a +.Pp +quoted punctuation: +.Ar a "(" b "|" c ")" d "," "Sy" bold . diff --git a/regress/usr.bin/mandoc/mdoc/Ar/punct.out_ascii b/regress/usr.bin/mandoc/mdoc/Ar/punct.out_ascii index d780dbcff26..01426c58ff2 100644 --- a/regress/usr.bin/mandoc/mdoc/Ar/punct.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/Ar/punct.out_ascii @@ -9,4 +9,6 @@ DDEESSCCRRIIPPTTIIOONN _f_i_l_e _._._.; _z colon _f_i_l_e _._._.: _z quest _f_i_l_e _._._.? _z excl _f_i_l_e _._._.! _z paren _f_i_l_e _._._.) _z bracket _f_i_l_e _._._.] _z bar | _m op paren (_a op bracket [_a + quoted punctuation: _a (_b | _c) _d, bboolldd. + OpenBSD August 21, 2014 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Ar/punct.out_markdown b/regress/usr.bin/mandoc/mdoc/Ar/punct.out_markdown index b8e3eda6d3e..932b86601d9 100644 --- a/regress/usr.bin/mandoc/mdoc/Ar/punct.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/Ar/punct.out_markdown @@ -39,4 +39,7 @@ op paren op bracket \[*a* +quoted punctuation: +*a* (*b* | *c*) *d*, **bold**. + OpenBSD - August 21, 2014 diff --git a/regress/usr.bin/mandoc/mdoc/At/invalid.in b/regress/usr.bin/mandoc/mdoc/At/invalid.in index 8e7d9ce5c9a..345529ab4ec 100644 --- a/regress/usr.bin/mandoc/mdoc/At/invalid.in +++ b/regress/usr.bin/mandoc/mdoc/At/invalid.in @@ -12,6 +12,6 @@ valid argument: .At v7 .Pp invalid argument: -.At murks +.At murks "Sy" bold .Pp end of file diff --git a/regress/usr.bin/mandoc/mdoc/At/invalid.out_ascii b/regress/usr.bin/mandoc/mdoc/At/invalid.out_ascii index c1cab598e3b..13e82d3da75 100644 --- a/regress/usr.bin/mandoc/mdoc/At/invalid.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/At/invalid.out_ascii @@ -8,7 +8,7 @@ DDEESSCCRRIIPPTTIIOONN valid argument: Version 7 AT&T UNIX - invalid argument: AT&T UNIX murks + invalid argument: AT&T UNIX murks bboolldd end of file diff --git a/regress/usr.bin/mandoc/mdoc/At/invalid.out_markdown b/regress/usr.bin/mandoc/mdoc/At/invalid.out_markdown index 0b952558485..d76b8fa6dcd 100644 --- a/regress/usr.bin/mandoc/mdoc/At/invalid.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/At/invalid.out_markdown @@ -13,7 +13,7 @@ valid argument: Version 7 AT&T UNIX invalid argument: -AT&T UNIX murks +AT&T UNIX murks **bold** end of file diff --git a/regress/usr.bin/mandoc/mdoc/Brq/empty.in b/regress/usr.bin/mandoc/mdoc/Brq/empty.in index 323df0749e2..5d3174746fb 100644 --- a/regress/usr.bin/mandoc/mdoc/Brq/empty.in +++ b/regress/usr.bin/mandoc/mdoc/Brq/empty.in @@ -8,7 +8,7 @@ An empty .Brq and a full -.Brq user@host +.Brq "(" user@host quotation. And another -.Bro full Brc one . +.Bro "(" full Brc one "Sy" bold . diff --git a/regress/usr.bin/mandoc/mdoc/Brq/empty.out_ascii b/regress/usr.bin/mandoc/mdoc/Brq/empty.out_ascii index bb59c24721e..9d638d0cc2c 100644 --- a/regress/usr.bin/mandoc/mdoc/Brq/empty.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/Brq/empty.out_ascii @@ -4,6 +4,7 @@ NNAAMMEE BBrrqq--eemmppttyy - empty implicit enclosure macros DDEESSCCRRIIPPTTIIOONN - An empty {} and a full {user@host} quotation. And another {full} one. + An empty {} and a full ({user@host} quotation. And another ({full} one + bboolldd. OpenBSD October 21, 2010 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Brq/empty.out_markdown b/regress/usr.bin/mandoc/mdoc/Brq/empty.out_markdown index f32edd8cfe4..a335a57c61b 100644 --- a/regress/usr.bin/mandoc/mdoc/Brq/empty.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/Brq/empty.out_markdown @@ -9,9 +9,9 @@ BRQ-EMPTY(1) - General Commands Manual An empty {} and a full -{user@host} +({user@host} quotation. And another -{full} one. +({full} one **bold**. OpenBSD - October 21, 2010 diff --git a/regress/usr.bin/mandoc/mdoc/Bx/args.in b/regress/usr.bin/mandoc/mdoc/Bx/args.in index 32530959b8c..d44792755ea 100644 --- a/regress/usr.bin/mandoc/mdoc/Bx/args.in +++ b/regress/usr.bin/mandoc/mdoc/Bx/args.in @@ -9,7 +9,7 @@ no arguments: .Bx .Pp one standard argument: -.Bx 4.4 +.Bx 4.4 "." .Pp one non-standard argument: .Bx nett @@ -21,6 +21,6 @@ two standard arguments: .Bx 4.3 reno .Pp more arguments: -.Bx 4.3 tahoe and some additional words +.Bx 4.3 tahoe and "Em" some additional words .Pp end of test document diff --git a/regress/usr.bin/mandoc/mdoc/Bx/args.out_ascii b/regress/usr.bin/mandoc/mdoc/Bx/args.out_ascii index 9f45970e449..24e03ffedf2 100644 --- a/regress/usr.bin/mandoc/mdoc/Bx/args.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/Bx/args.out_ascii @@ -6,7 +6,7 @@ NNAAMMEE DDEESSCCRRIIPPTTIIOONN no arguments: BSD - one standard argument: 4.4BSD + one standard argument: 4.4BSD. one non-standard argument: nettBSD @@ -14,7 +14,7 @@ DDEESSCCRRIIPPTTIIOONN two standard arguments: 4.3BSD-Reno - more arguments: 4.3BSD-Tahoe and some additional words + more arguments: 4.3BSD-Tahoe and _s_o_m_e _a_d_d_i_t_i_o_n_a_l _w_o_r_d_s end of test document diff --git a/regress/usr.bin/mandoc/mdoc/Bx/args.out_markdown b/regress/usr.bin/mandoc/mdoc/Bx/args.out_markdown index 1c9fc45d0fa..5450ee5156c 100644 --- a/regress/usr.bin/mandoc/mdoc/Bx/args.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/Bx/args.out_markdown @@ -10,7 +10,7 @@ no arguments: BSD one standard argument: -4\.4BSD +4\.4BSD. one non-standard argument: nettBSD @@ -22,7 +22,7 @@ two standard arguments: 4\.3BSD-Reno more arguments: -4\.3BSD-Tahoe and some additional words +4\.3BSD-Tahoe and *some additional words* end of test document diff --git a/regress/usr.bin/mandoc/mdoc/Cd/Makefile b/regress/usr.bin/mandoc/mdoc/Cd/Makefile index 93be300a182..dd491146eea 100644 --- a/regress/usr.bin/mandoc/mdoc/Cd/Makefile +++ b/regress/usr.bin/mandoc/mdoc/Cd/Makefile @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile,v 1.7 2017/03/08 22:53:35 schwarze Exp $ +# $OpenBSD: Makefile,v 1.8 2017/05/30 16:21:08 schwarze Exp $ -REGRESS_TARGETS = noarg font eos +REGRESS_TARGETS = eos font noarg punct LINT_TARGETS = noarg .include diff --git a/regress/usr.bin/mandoc/mdoc/Cd/punct.in b/regress/usr.bin/mandoc/mdoc/Cd/punct.in new file mode 100644 index 00000000000..9a072c0c979 --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Cd/punct.in @@ -0,0 +1,42 @@ +.Dd August 21, 2014 +.Dt CD-PUNCT 1 +.Os OpenBSD +.Sh NAME +.Nm Cd-punct +.Nd punctuation handling by the Cd macro +.Sh DESCRIPTION +closing punctuation +.Cd a ) +only one +.Cd ) +only more than one +.Cd ) ) +middle +.Cd a ) z +start +.Cd ) z +dot +.Cd . z +comma +.Cd , z +semicolon +.Cd ; z +colon +.Cd : z +quest +.Cd ? z +excl +.Cd ! z +paren +.Cd ) z +bracket +.Cd ] z +bar +.Cd | m +op paren +.Cd ( a +op bracket +.Cd [ a +.Pp +quoted punctuation: +.Cd a "(" b "|" c ")" d "." "Em" italic . diff --git a/regress/usr.bin/mandoc/mdoc/Cd/punct.out_ascii b/regress/usr.bin/mandoc/mdoc/Cd/punct.out_ascii new file mode 100644 index 00000000000..88d369dcae4 --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Cd/punct.out_ascii @@ -0,0 +1,13 @@ +CD-PUNCT(1) General Commands Manual CD-PUNCT(1) + +NNAAMMEE + CCdd--ppuunncctt - punctuation handling by the Cd macro + +DDEESSCCRRIIPPTTIIOONN + closing punctuation aa) only one ) only more than one )) middle aa) zz start + ) zz dot . zz comma , zz semicolon ; zz colon : zz quest ? zz excl ! zz paren ) + zz bracket ] zz bar | mm op paren (aa op bracket [aa + + quoted punctuation: aa (bb | cc) dd. _i_t_a_l_i_c. + +OpenBSD August 21, 2014 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Cd/punct.out_markdown b/regress/usr.bin/mandoc/mdoc/Cd/punct.out_markdown new file mode 100644 index 00000000000..c39ee621dfe --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Cd/punct.out_markdown @@ -0,0 +1,45 @@ +CD-PUNCT(1) - General Commands Manual + +# NAME + +**Cd-punct** - punctuation handling by the Cd macro + +# DESCRIPTION + +closing punctuation +**a**) +only one +) +only more than one +)) +middle +**a**) **z** +start +) **z** +dot +. **z** +comma +, **z** +semicolon +; **z** +colon +: **z** +quest +? **z** +excl +! **z** +paren +) **z** +bracket +] **z** +bar +| **m** +op paren +(**a** +op bracket +\[**a** + +quoted punctuation: +**a** (**b** | **c**) **d**. *italic*. + +OpenBSD - August 21, 2014 diff --git a/regress/usr.bin/mandoc/mdoc/Cm/Makefile b/regress/usr.bin/mandoc/mdoc/Cm/Makefile index 805905dcc16..6681facf14a 100644 --- a/regress/usr.bin/mandoc/mdoc/Cm/Makefile +++ b/regress/usr.bin/mandoc/mdoc/Cm/Makefile @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile,v 1.5 2017/03/08 22:53:35 schwarze Exp $ +# $OpenBSD: Makefile,v 1.6 2017/05/30 16:21:08 schwarze Exp $ -REGRESS_TARGETS = basic font noarg +REGRESS_TARGETS = basic font noarg punct LINT_TARGETS = noarg .include diff --git a/regress/usr.bin/mandoc/mdoc/Cm/punct.in b/regress/usr.bin/mandoc/mdoc/Cm/punct.in new file mode 100644 index 00000000000..432e470c919 --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Cm/punct.in @@ -0,0 +1,42 @@ +.Dd August 21, 2014 +.Dt Cm-PUNCT 1 +.Os OpenBSD +.Sh NAME +.Nm Cm-punct +.Nd punctuation handling by the Cm macro +.Sh DESCRIPTION +closing punctuation +.Cm a ) +only one +.Cm ) +only more than one +.Cm ) ) +middle +.Cm a ) z +start +.Cm ) z +dot +.Cm . z +comma +.Cm , z +semicolon +.Cm ; z +colon +.Cm : z +quest +.Cm ? z +excl +.Cm ! z +paren +.Cm ) z +bracket +.Cm ] z +bar +.Cm | m +op paren +.Cm ( a +op bracket +.Cm [ a +.Pp +quoted punctuation: +.Cm a "(" b "|" c ")" d "." "Em" italic . diff --git a/regress/usr.bin/mandoc/mdoc/Cm/punct.out_ascii b/regress/usr.bin/mandoc/mdoc/Cm/punct.out_ascii new file mode 100644 index 00000000000..7ac1fe76841 --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Cm/punct.out_ascii @@ -0,0 +1,13 @@ +Cm-PUNCT(1) General Commands Manual Cm-PUNCT(1) + +NNAAMMEE + CCmm--ppuunncctt - punctuation handling by the Cm macro + +DDEESSCCRRIIPPTTIIOONN + closing punctuation aa) only one ) only more than one )) middle aa) zz start + ) zz dot . zz comma , zz semicolon ; zz colon : zz quest ? zz excl ! zz paren ) + zz bracket ] zz bar | mm op paren (aa op bracket [aa + + quoted punctuation: aa (bb | cc) dd. _i_t_a_l_i_c. + +OpenBSD August 21, 2014 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Cm/punct.out_markdown b/regress/usr.bin/mandoc/mdoc/Cm/punct.out_markdown new file mode 100644 index 00000000000..c924228cffb --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Cm/punct.out_markdown @@ -0,0 +1,45 @@ +Cm-PUNCT(1) - General Commands Manual + +# NAME + +**Cm-punct** - punctuation handling by the Cm macro + +# DESCRIPTION + +closing punctuation +**a**) +only one +) +only more than one +)) +middle +**a**) **z** +start +) **z** +dot +. **z** +comma +, **z** +semicolon +; **z** +colon +: **z** +quest +? **z** +excl +! **z** +paren +) **z** +bracket +] **z** +bar +| **m** +op paren +(**a** +op bracket +\[**a** + +quoted punctuation: +**a** (**b** | **c**) **d**. *italic*. + +OpenBSD - August 21, 2014 diff --git a/regress/usr.bin/mandoc/mdoc/Dq/empty.in b/regress/usr.bin/mandoc/mdoc/Dq/empty.in index 6e228898c21..1d072d5ec8f 100644 --- a/regress/usr.bin/mandoc/mdoc/Dq/empty.in +++ b/regress/usr.bin/mandoc/mdoc/Dq/empty.in @@ -8,7 +8,7 @@ An empty .Dq and a full -.Dq user@host +.Dq "(" user@host quotation. And another -.Do full Dc one . +.Do "(" full Dc one "Sy" bold . diff --git a/regress/usr.bin/mandoc/mdoc/Dq/empty.out_ascii b/regress/usr.bin/mandoc/mdoc/Dq/empty.out_ascii index e8f1da5b344..9f7c8bbe4ba 100644 --- a/regress/usr.bin/mandoc/mdoc/Dq/empty.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/Dq/empty.out_ascii @@ -4,6 +4,7 @@ NNAAMMEE DDqq--eemmppttyy - empty implicit enclosure macros DDEESSCCRRIIPPTTIIOONN - An empty "" and a full "user@host" quotation. And another "full" one. + An empty "" and a full ("user@host" quotation. And another ("full" one + bboolldd. OpenBSD October 21, 2010 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Dq/empty.out_markdown b/regress/usr.bin/mandoc/mdoc/Dq/empty.out_markdown index 6cba8746102..b6188f5cdc7 100644 --- a/regress/usr.bin/mandoc/mdoc/Dq/empty.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/Dq/empty.out_markdown @@ -9,9 +9,9 @@ DQ-EMPTY(1) - General Commands Manual An empty "" and a full -"user@host" +("user@host" quotation. And another -"full" one. +("full" one **bold**. OpenBSD - October 21, 2010 diff --git a/regress/usr.bin/mandoc/mdoc/Dv/font.in b/regress/usr.bin/mandoc/mdoc/Dv/font.in index 8e3c5bcb8b3..8d9e370b26d 100644 --- a/regress/usr.bin/mandoc/mdoc/Dv/font.in +++ b/regress/usr.bin/mandoc/mdoc/Dv/font.in @@ -10,4 +10,4 @@ The macro. .Pp And with -.Dv some \\fIembedded\\fP string . +.Dv some \\fIembedded\\fP string ";" "Sy" bold . diff --git a/regress/usr.bin/mandoc/mdoc/Dv/font.out_ascii b/regress/usr.bin/mandoc/mdoc/Dv/font.out_ascii index 88f0760d2c8..82013346076 100644 --- a/regress/usr.bin/mandoc/mdoc/Dv/font.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/Dv/font.out_ascii @@ -6,6 +6,6 @@ NNAAMMEE DDEESSCCRRIIPPTTIIOONN The BUFSIZ macro. - And with some _e_m_b_e_d_d_e_d string. + And with some _e_m_b_e_d_d_e_d string; bboolldd. OpenBSD October 21, 2011 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Dv/font.out_markdown b/regress/usr.bin/mandoc/mdoc/Dv/font.out_markdown index b3351e327c1..0bf567d8345 100644 --- a/regress/usr.bin/mandoc/mdoc/Dv/font.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/Dv/font.out_markdown @@ -11,6 +11,6 @@ The macro. And with -`some embedded string`. +`some embedded string`; **bold**. OpenBSD - October 21, 2011 diff --git a/regress/usr.bin/mandoc/mdoc/Em/punct.in b/regress/usr.bin/mandoc/mdoc/Em/punct.in index b49ca505da5..a8e012e703f 100644 --- a/regress/usr.bin/mandoc/mdoc/Em/punct.in +++ b/regress/usr.bin/mandoc/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/usr.bin/mandoc/mdoc/Em/punct.out_ascii b/regress/usr.bin/mandoc/mdoc/Em/punct.out_ascii index 4396e6692f6..e0f60dbe2bf 100644 --- a/regress/usr.bin/mandoc/mdoc/Em/punct.out_ascii +++ b/regress/usr.bin/mandoc/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/usr.bin/mandoc/mdoc/Em/punct.out_lint b/regress/usr.bin/mandoc/mdoc/Em/punct.out_lint index 7d16f436a58..cfcc04a7985 100644 --- a/regress/usr.bin/mandoc/mdoc/Em/punct.out_lint +++ b/regress/usr.bin/mandoc/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/usr.bin/mandoc/mdoc/Em/punct.out_markdown b/regress/usr.bin/mandoc/mdoc/Em/punct.out_markdown index 5d3e85242a1..6cf5402d30c 100644 --- a/regress/usr.bin/mandoc/mdoc/Em/punct.out_markdown +++ b/regress/usr.bin/mandoc/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 diff --git a/regress/usr.bin/mandoc/mdoc/Eo/empty.in b/regress/usr.bin/mandoc/mdoc/Eo/empty.in index bf637f27744..b971b6dca28 100644 --- a/regress/usr.bin/mandoc/mdoc/Eo/empty.in +++ b/regress/usr.bin/mandoc/mdoc/Eo/empty.in @@ -32,7 +32,7 @@ text all .Eo << text -.Ec >> +.Ec >> "Sy" bold completely empty .No prefix Ns Eo .Ec diff --git a/regress/usr.bin/mandoc/mdoc/Eo/empty.out_ascii b/regress/usr.bin/mandoc/mdoc/Eo/empty.out_ascii index a28e5727610..96849bb0cbe 100644 --- a/regress/usr.bin/mandoc/mdoc/Eo/empty.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/Eo/empty.out_ascii @@ -5,9 +5,9 @@ NNAAMMEE DDEESSCCRRIIPPTTIIOONN completely empty closing only >> content only text opening only << no - opening text>> no content <<>> no closing <> completely - empty prefix closing only prefix>> no opening prefixtext>> no closing - <> no content <<>> no closing <> bboolldd + completely empty prefix closing only prefix>> no opening prefixtext>> no + closing <> end of file OpenBSD February 1, 2015 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Eo/empty.out_markdown b/regress/usr.bin/mandoc/mdoc/Eo/empty.out_markdown index e0ed0e9b3af..506a4a0973d 100644 --- a/regress/usr.bin/mandoc/mdoc/Eo/empty.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/Eo/empty.out_markdown @@ -20,7 +20,7 @@ no content no closing <<text all -<<text>> +<<text>> **bold** completely empty prefixclosing only prefix>> diff --git a/regress/usr.bin/mandoc/mdoc/Eo/obsolete.in b/regress/usr.bin/mandoc/mdoc/Eo/obsolete.in index fe0bb087f2d..2640f2aac24 100644 --- a/regress/usr.bin/mandoc/mdoc/Eo/obsolete.in +++ b/regress/usr.bin/mandoc/mdoc/Eo/obsolete.in @@ -11,7 +11,7 @@ initial text .En enclosed words with Fl flags middle text -.En more enclosed words +.En "(" more enclosed words final text .Pp .Es diff --git a/regress/usr.bin/mandoc/mdoc/Eo/obsolete.out_ascii b/regress/usr.bin/mandoc/mdoc/Eo/obsolete.out_ascii index bb2f15c5c94..cba2fc7da3d 100644 --- a/regress/usr.bin/mandoc/mdoc/Eo/obsolete.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/Eo/obsolete.out_ascii @@ -6,7 +6,7 @@ NNAAMMEE DDEESSCCRRIIPPTTIIOONN no prior Es - surplus initial text <> middle text <> middle text (<> final text initial text after empty Es final text diff --git a/regress/usr.bin/mandoc/mdoc/Eo/obsolete.out_markdown b/regress/usr.bin/mandoc/mdoc/Eo/obsolete.out_markdown index 21a3e6907d4..200ea6572ef 100644 --- a/regress/usr.bin/mandoc/mdoc/Eo/obsolete.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/Eo/obsolete.out_markdown @@ -12,7 +12,7 @@ surplus initial text <<enclosed words with **-flags**>> middle text -<<more enclosed words>> +(<<more enclosed words>> final text initial text diff --git a/regress/usr.bin/mandoc/mdoc/Er/noarg.in b/regress/usr.bin/mandoc/mdoc/Er/noarg.in index 96aa2cee966..6dc2aea6f8a 100644 --- a/regress/usr.bin/mandoc/mdoc/Er/noarg.in +++ b/regress/usr.bin/mandoc/mdoc/Er/noarg.in @@ -6,7 +6,7 @@ .Nd error constant macro without an argument .Sh DESCRIPTION with error: -.Er ENOENT +.Er ENOENT ";" "Sy" bold ; no error: .Er end of test document diff --git a/regress/usr.bin/mandoc/mdoc/Er/noarg.out_ascii b/regress/usr.bin/mandoc/mdoc/Er/noarg.out_ascii index 83f45f0764b..cd8cc77b6db 100644 --- a/regress/usr.bin/mandoc/mdoc/Er/noarg.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/Er/noarg.out_ascii @@ -4,6 +4,6 @@ NNAAMMEE EErr--nnooaarrgg - error constant macro without an argument DDEESSCCRRIIPPTTIIOONN - with error: ENOENT no error: end of test document + with error: ENOENT; bboolldd; no error: end of test document OpenBSD January 19, 2011 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Er/noarg.out_markdown b/regress/usr.bin/mandoc/mdoc/Er/noarg.out_markdown index 0bb4b979969..17dba3d4293 100644 --- a/regress/usr.bin/mandoc/mdoc/Er/noarg.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/Er/noarg.out_markdown @@ -7,7 +7,7 @@ ER-NOARG(1) - General Commands Manual # DESCRIPTION with error: -`ENOENT` +`ENOENT`; **bold**; no error: end of test document diff --git a/regress/usr.bin/mandoc/mdoc/Ev/font.in b/regress/usr.bin/mandoc/mdoc/Ev/font.in index a9213d81be1..75237cb03aa 100644 --- a/regress/usr.bin/mandoc/mdoc/Ev/font.in +++ b/regress/usr.bin/mandoc/mdoc/Ev/font.in @@ -10,4 +10,4 @@ The variable. .Pp And with -.Ev some \\fIembedded\\fP string . +.Ev some \\fIembedded\\fP string ";" "Sy" bold. diff --git a/regress/usr.bin/mandoc/mdoc/Ev/font.out_ascii b/regress/usr.bin/mandoc/mdoc/Ev/font.out_ascii index fad07429b5a..a5dc5399385 100644 --- a/regress/usr.bin/mandoc/mdoc/Ev/font.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/Ev/font.out_ascii @@ -6,6 +6,6 @@ NNAAMMEE DDEESSCCRRIIPPTTIIOONN The PATH variable. - And with some _e_m_b_e_d_d_e_d string. + And with some _e_m_b_e_d_d_e_d string; bboolldd.. OpenBSD October 21, 2011 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Ev/font.out_markdown b/regress/usr.bin/mandoc/mdoc/Ev/font.out_markdown index 491c932940f..f2bac6dc47d 100644 --- a/regress/usr.bin/mandoc/mdoc/Ev/font.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/Ev/font.out_markdown @@ -11,6 +11,6 @@ The variable. And with -`some embedded string`. +`some embedded string`; **bold.** OpenBSD - October 21, 2011 diff --git a/regress/usr.bin/mandoc/mdoc/Fl/punct.in b/regress/usr.bin/mandoc/mdoc/Fl/punct.in index ac7eecc744c..8cc4c2febc4 100644 --- a/regress/usr.bin/mandoc/mdoc/Fl/punct.in +++ b/regress/usr.bin/mandoc/mdoc/Fl/punct.in @@ -37,3 +37,6 @@ op paren .Fl ( a op bracket .Fl [ a +.Pp +quoted punctuation: +.Fl a "(" b "|" c ")" d "," "Em" italic . diff --git a/regress/usr.bin/mandoc/mdoc/Fl/punct.out_ascii b/regress/usr.bin/mandoc/mdoc/Fl/punct.out_ascii index b619154d092..1ef60d4dfb7 100644 --- a/regress/usr.bin/mandoc/mdoc/Fl/punct.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/Fl/punct.out_ascii @@ -9,4 +9,6 @@ DDEESSCCRRIIPPTTIIOONN excl --! --zz paren --) --zz bracket --] --zz bar -- | --mm op paren (--aa op bracket [--aa + quoted punctuation: --aa (--bb | --cc) --dd, _i_t_a_l_i_c. + OpenBSD August 21, 2014 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Fl/punct.out_markdown b/regress/usr.bin/mandoc/mdoc/Fl/punct.out_markdown index aba7054db6a..54d10ae59d8 100644 --- a/regress/usr.bin/mandoc/mdoc/Fl/punct.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/Fl/punct.out_markdown @@ -39,4 +39,7 @@ op paren op bracket \[**-a** +quoted punctuation: +**-a** (**-b** | **-c**) **-d**, *italic*. + OpenBSD - August 21, 2014 diff --git a/regress/usr.bin/mandoc/mdoc/Fo/font.in b/regress/usr.bin/mandoc/mdoc/Fo/font.in index 894a86aa3ed..6e2c7d86c33 100644 --- a/regress/usr.bin/mandoc/mdoc/Fo/font.in +++ b/regress/usr.bin/mandoc/mdoc/Fo/font.in @@ -15,5 +15,5 @@ trailing text .Pp .Fo function .Fa prefix\\fBbold\\fPsuffix -.Fc +.Fc "Sy" bold trailing text diff --git a/regress/usr.bin/mandoc/mdoc/Fo/font.out_ascii b/regress/usr.bin/mandoc/mdoc/Fo/font.out_ascii index 3490ad8acd3..698a7683956 100644 --- a/regress/usr.bin/mandoc/mdoc/Fo/font.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/Fo/font.out_ascii @@ -8,6 +8,6 @@ DDEESSCCRRIIPPTTIIOONN pprreeffiixx_n_a_m_essuuffffiixx(_t_y_p_e _a_r_g) trailing text - ffuunnccttiioonn(_p_r_e_f_i_xbboolldd_s_u_f_f_i_x) trailing text + ffuunnccttiioonn(_p_r_e_f_i_xbboolldd_s_u_f_f_i_x) bboolldd trailing text OpenBSD July 9, 2012 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Fo/font.out_markdown b/regress/usr.bin/mandoc/mdoc/Fo/font.out_markdown index d36e0b8a99f..84393910d49 100644 --- a/regress/usr.bin/mandoc/mdoc/Fo/font.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/Fo/font.out_markdown @@ -12,7 +12,7 @@ trailing text **prefix*name*suffix**(*type arg*) trailing text -**function**(*prefix**bold**suffix*) +**function**(*prefix**bold**suffix*) **bold** trailing text OpenBSD - July 9, 2012 diff --git a/regress/usr.bin/mandoc/mdoc/Fo/punct.in b/regress/usr.bin/mandoc/mdoc/Fo/punct.in index 0b407ffb55e..e1657ec7104 100644 --- a/regress/usr.bin/mandoc/mdoc/Fo/punct.in +++ b/regress/usr.bin/mandoc/mdoc/Fo/punct.in @@ -1,9 +1,13 @@ -.Dd November 20, 2014 +.Dd May 20, 2017 .Dt FO-PUNCT 1 .Os OpenBSD .Sh NAME .Nm Fo-punct -.Nd punctuation on function name input lines +.Nd punctuation on function input lines .Sh DESCRIPTION .Ft double -.Fn sin , cos +.Fn sin "," cos "Em" italic +.Pp +.Fa x "," y "Sy" bold +.Pp +.Ft int "," float "Sy" bold diff --git a/regress/usr.bin/mandoc/mdoc/Fo/punct.out_ascii b/regress/usr.bin/mandoc/mdoc/Fo/punct.out_ascii index 4e8b1abe5d1..febf646e0dd 100644 --- a/regress/usr.bin/mandoc/mdoc/Fo/punct.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/Fo/punct.out_ascii @@ -1,9 +1,13 @@ FO-PUNCT(1) General Commands Manual FO-PUNCT(1) NNAAMMEE - FFoo--ppuunncctt - punctuation on function name input lines + FFoo--ppuunncctt - punctuation on function input lines DDEESSCCRRIIPPTTIIOONN - _d_o_u_b_l_e ssiinn(), cos + _d_o_u_b_l_e ssiinn(), cos _i_t_a_l_i_c -OpenBSD November 20, 2014 OpenBSD + _x, _y bboolldd + + _i_n_t, _f_l_o_a_t bboolldd + +OpenBSD May 20, 2017 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Fo/punct.out_markdown b/regress/usr.bin/mandoc/mdoc/Fo/punct.out_markdown index 3128aeefd8c..88524f6fedf 100644 --- a/regress/usr.bin/mandoc/mdoc/Fo/punct.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/Fo/punct.out_markdown @@ -2,11 +2,15 @@ FO-PUNCT(1) - General Commands Manual # NAME -**Fo-punct** - punctuation on function name input lines +**Fo-punct** - punctuation on function input lines # DESCRIPTION *double* -**sin**(), cos +**sin**(), cos *italic* -OpenBSD - November 20, 2014 +*x*, *y* **bold** + +*int*, *float* **bold** + +OpenBSD - May 20, 2017 diff --git a/regress/usr.bin/mandoc/mdoc/Ic/Makefile b/regress/usr.bin/mandoc/mdoc/Ic/Makefile index 78da864da6f..bba07fb34b1 100644 --- a/regress/usr.bin/mandoc/mdoc/Ic/Makefile +++ b/regress/usr.bin/mandoc/mdoc/Ic/Makefile @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile,v 1.6 2017/03/08 22:53:35 schwarze Exp $ +# $OpenBSD: Makefile,v 1.7 2017/05/30 16:21:08 schwarze Exp $ -REGRESS_TARGETS = noarg font +REGRESS_TARGETS = font noarg punct LINT_TARGETS = noarg .include diff --git a/regress/usr.bin/mandoc/mdoc/Ic/punct.in b/regress/usr.bin/mandoc/mdoc/Ic/punct.in new file mode 100644 index 00000000000..a62058b61ce --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Ic/punct.in @@ -0,0 +1,42 @@ +.Dd August 21, 2014 +.Dt Ic-PUNCT 1 +.Os OpenBSD +.Sh NAME +.Nm Ic-punct +.Nd punctuation handling by the Ic macro +.Sh DESCRIPTION +closing punctuation +.Ic a ) +only one +.Ic ) +only more than one +.Ic ) ) +middle +.Ic a ) z +start +.Ic ) z +dot +.Ic . z +comma +.Ic , z +semicolon +.Ic ; z +colon +.Ic : z +quest +.Ic ? z +excl +.Ic ! z +paren +.Ic ) z +bracket +.Ic ] z +bar +.Ic | m +op paren +.Ic ( a +op bracket +.Ic [ a +.Pp +quoted punctuation: +.Ic a "(" b "|" c ")" d "," "Em" italic . diff --git a/regress/usr.bin/mandoc/mdoc/Ic/punct.out_ascii b/regress/usr.bin/mandoc/mdoc/Ic/punct.out_ascii new file mode 100644 index 00000000000..4c37048383b --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Ic/punct.out_ascii @@ -0,0 +1,13 @@ +Ic-PUNCT(1) General Commands Manual Ic-PUNCT(1) + +NNAAMMEE + IIcc--ppuunncctt - punctuation handling by the Ic macro + +DDEESSCCRRIIPPTTIIOONN + closing punctuation aa) only one ) only more than one )) middle aa) zz start + ) zz dot . zz comma , zz semicolon ; zz colon : zz quest ? zz excl ! zz paren ) + zz bracket ] zz bar | mm op paren (aa op bracket [aa + + quoted punctuation: aa (bb | cc) dd, _i_t_a_l_i_c. + +OpenBSD August 21, 2014 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Ic/punct.out_markdown b/regress/usr.bin/mandoc/mdoc/Ic/punct.out_markdown new file mode 100644 index 00000000000..7fd2742fb55 --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Ic/punct.out_markdown @@ -0,0 +1,45 @@ +Ic-PUNCT(1) - General Commands Manual + +# NAME + +**Ic-punct** - punctuation handling by the Ic macro + +# DESCRIPTION + +closing punctuation +**a**) +only one +) +only more than one +)) +middle +**a**) **z** +start +) **z** +dot +. **z** +comma +, **z** +semicolon +; **z** +colon +: **z** +quest +? **z** +excl +! **z** +paren +) **z** +bracket +] **z** +bar +| **m** +op paren +(**a** +op bracket +\[**a** + +quoted punctuation: +**a** (**b** | **c**) **d**, *italic*. + +OpenBSD - August 21, 2014 diff --git a/regress/usr.bin/mandoc/mdoc/In/font.in b/regress/usr.bin/mandoc/mdoc/In/font.in index e24ab18dd5f..9399325bdd1 100644 --- a/regress/usr.bin/mandoc/mdoc/In/font.in +++ b/regress/usr.bin/mandoc/mdoc/In/font.in @@ -6,5 +6,5 @@ .Nd changing the font inside the include macro .Sh DESCRIPTION normal text -.In prefix\\fBheader\\fPsuffix +.In prefix\\fBheader\\fPsuffix | after ":" punctuation "Sy" bold trailing text diff --git a/regress/usr.bin/mandoc/mdoc/In/font.out_ascii b/regress/usr.bin/mandoc/mdoc/In/font.out_ascii index 7d1948e4cab..d868a8cd810 100644 --- a/regress/usr.bin/mandoc/mdoc/In/font.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/In/font.out_ascii @@ -4,6 +4,6 @@ NNAAMMEE IInn--ffoonntt - changing the font inside the include macro DDEESSCCRRIIPPTTIIOONN - normal text <_p_r_e_f_i_xhheeaaddeerr_s_u_f_f_i_x> trailing text + normal text <_p_r_e_f_i_xhheeaaddeerr_s_u_f_f_i_x> | after: punctuation bboolldd trailing text OpenBSD July 9, 2012 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/In/font.out_markdown b/regress/usr.bin/mandoc/mdoc/In/font.out_markdown index e007a019e49..4b99b61ea6f 100644 --- a/regress/usr.bin/mandoc/mdoc/In/font.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/In/font.out_markdown @@ -7,7 +7,7 @@ IN-FONT(2) - System Calls Manual # DESCRIPTION normal text -<*prefix**header**suffix*> +<*prefix**header**suffix*> | after: punctuation **bold** trailing text OpenBSD - July 9, 2012 diff --git a/regress/usr.bin/mandoc/mdoc/Li/punct.in b/regress/usr.bin/mandoc/mdoc/Li/punct.in index 331e55da8e7..025657701ff 100644 --- a/regress/usr.bin/mandoc/mdoc/Li/punct.in +++ b/regress/usr.bin/mandoc/mdoc/Li/punct.in @@ -7,7 +7,7 @@ .Sh DESCRIPTION Leading punctuation: .Li ( b -.Li [ b +.Li "[" b .Li | b .Li . b .Li , b @@ -23,7 +23,7 @@ Trailing punctuation: .Li a [ .Li a | .Li a . -.Li a , +.Li a "," .Li a ; .Li a : .Li a ? @@ -37,11 +37,11 @@ Middle punctuation: .Li a | b .Li a . b .Li a , b -.Li a ; b +.Li a ";" b .Li a : b .Li a ? b .Li a ! b -.Li a ) b +.Li a ")" b .Li a ] b .Pp Isolated punctuation: @@ -78,6 +78,6 @@ Multiple punctuation: .Li [ ( arg ) ] . .Pp Quoted: -.Li "a . b Nm" +.Li "a . b Nm" "Sy" bold .Li ". b Nm" .Li "." diff --git a/regress/usr.bin/mandoc/mdoc/Li/punct.out_ascii b/regress/usr.bin/mandoc/mdoc/Li/punct.out_ascii index ae7d3f62dd4..d0de6c9aa71 100644 --- a/regress/usr.bin/mandoc/mdoc/Li/punct.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/Li/punct.out_ascii @@ -21,6 +21,6 @@ DDEESSCCRRIIPPTTIIOONN Multiple punctuation: [(arg)]. - Quoted: a . b Nm . b Nm . + Quoted: a . b Nm bboolldd . b Nm . OpenBSD November 17, 2014 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Li/punct.out_lint b/regress/usr.bin/mandoc/mdoc/Li/punct.out_lint index 3abdf12f7b2..bdce45c67d7 100644 --- a/regress/usr.bin/mandoc/mdoc/Li/punct.out_lint +++ b/regress/usr.bin/mandoc/mdoc/Li/punct.out_lint @@ -22,3 +22,4 @@ mandoc: punct.in:70:7: WARNING: skipping empty macro: Li mandoc: punct.in:71:7: WARNING: skipping empty macro: Li mandoc: punct.in:74:7: WARNING: skipping empty macro: Li mandoc: punct.in:75:7: WARNING: skipping empty macro: Li +mandoc: punct.in:83:2: WARNING: skipping empty macro: Li diff --git a/regress/usr.bin/mandoc/mdoc/Li/punct.out_markdown b/regress/usr.bin/mandoc/mdoc/Li/punct.out_markdown index fcfc83b3f1a..97110e220d5 100644 --- a/regress/usr.bin/mandoc/mdoc/Li/punct.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/Li/punct.out_markdown @@ -79,8 +79,8 @@ Multiple punctuation: \[(`arg`)]. Quoted: -`a . b Nm` +`a . b Nm` **bold** `. b Nm` -`.` +. OpenBSD - November 17, 2014 diff --git a/regress/usr.bin/mandoc/mdoc/Ms/font.in b/regress/usr.bin/mandoc/mdoc/Ms/font.in index dc841740e7c..24c2c23656f 100644 --- a/regress/usr.bin/mandoc/mdoc/Ms/font.in +++ b/regress/usr.bin/mandoc/mdoc/Ms/font.in @@ -6,5 +6,5 @@ .Nd changing fonts inside the mathematical symbol macro .Sh DESCRIPTION normal text -.Ms bold\\fIemphasis\\fPback | after : punctuation +.Ms bold\\fIemphasis\\fPback | after ":" punctuation "Em" italic trailing text diff --git a/regress/usr.bin/mandoc/mdoc/Ms/font.out_ascii b/regress/usr.bin/mandoc/mdoc/Ms/font.out_ascii index 280aa4071f8..50ca3b2a5b9 100644 --- a/regress/usr.bin/mandoc/mdoc/Ms/font.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/Ms/font.out_ascii @@ -4,6 +4,6 @@ NNAAMMEE MMss--ffoonntt - changing fonts inside the mathematical symbol macro DDEESSCCRRIIPPTTIIOONN - normal text bboolldd_e_m_p_h_a_s_i_sbbaacckk | aafftteerr: ppuunnccttuuaattiioonn trailing text + normal text bboolldd_e_m_p_h_a_s_i_sbbaacckk | aafftteerr: ppuunnccttuuaattiioonn _i_t_a_l_i_c trailing text OpenBSD November 20, 2014 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Ms/font.out_markdown b/regress/usr.bin/mandoc/mdoc/Ms/font.out_markdown index 7b04400b9d0..b554083a6a8 100644 --- a/regress/usr.bin/mandoc/mdoc/Ms/font.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/Ms/font.out_markdown @@ -7,7 +7,7 @@ MS-FONT(1) - General Commands Manual # DESCRIPTION normal text -**bold*emphasis*back** | **after**: **punctuation** +**bold*emphasis*back** | **after**: **punctuation** *italic* trailing text OpenBSD - November 20, 2014 diff --git a/regress/usr.bin/mandoc/mdoc/Mt/simple.in b/regress/usr.bin/mandoc/mdoc/Mt/simple.in index d9e36c3a671..16afb2da1e5 100644 --- a/regress/usr.bin/mandoc/mdoc/Mt/simple.in +++ b/regress/usr.bin/mandoc/mdoc/Mt/simple.in @@ -6,7 +6,7 @@ .Nd mailto .Sh DESCRIPTION Please send mail to -.Mt schwarze@openbsd.org . +.Mt schwarze@openbsd.org ";" "Sy" bold . .Pp Do not send mail to .Mt . diff --git a/regress/usr.bin/mandoc/mdoc/Mt/simple.out_ascii b/regress/usr.bin/mandoc/mdoc/Mt/simple.out_ascii index 65cde86476d..7b2ea5458e0 100644 --- a/regress/usr.bin/mandoc/mdoc/Mt/simple.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/Mt/simple.out_ascii @@ -4,7 +4,7 @@ NNAAMMEE MMtt--ssiimmppllee - mailto DDEESSCCRRIIPPTTIIOONN - Please send mail to _s_c_h_w_a_r_z_e_@_o_p_e_n_b_s_d_._o_r_g. + Please send mail to _s_c_h_w_a_r_z_e_@_o_p_e_n_b_s_d_._o_r_g; bboolldd. Do not send mail to _~. diff --git a/regress/usr.bin/mandoc/mdoc/Mt/simple.out_markdown b/regress/usr.bin/mandoc/mdoc/Mt/simple.out_markdown index 78c21be45e5..9281fee5356 100644 --- a/regress/usr.bin/mandoc/mdoc/Mt/simple.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/Mt/simple.out_markdown @@ -7,7 +7,7 @@ MT-SIMPLE(1) - General Commands Manual # DESCRIPTION Please send mail to -[schwarze@openbsd.org](mailto:schwarze@openbsd.org). +[schwarze@openbsd.org](mailto:schwarze@openbsd.org); **bold**. Do not send mail to [~](mailto:~). diff --git a/regress/usr.bin/mandoc/mdoc/No/punct.in b/regress/usr.bin/mandoc/mdoc/No/punct.in index b4d8ef73343..c952c7c4ae3 100644 --- a/regress/usr.bin/mandoc/mdoc/No/punct.in +++ b/regress/usr.bin/mandoc/mdoc/No/punct.in @@ -6,7 +6,7 @@ .Nd punctuation after the normal macro .Sh DESCRIPTION Leading punctuation: -.No ( b +.No "(" b .No [ b .No | b .No . b @@ -29,17 +29,17 @@ Trailing punctuation: .No a ? .No a ! .No a ) -.No a ] +.No a "]" .Pp Middle punctuation: .No a ( b -.No a [ b +.No a "[" b .No a | b .No a . b .No a , b .No a ; b .No a : b -.No a ? b +.No a "?" b .No a ! b .No a ) b .No a ] b @@ -78,6 +78,6 @@ Multiple punctuation: .No [ ( arg ) ] . .Pp Quoted: -.No "a . b Nm" +.No "a . b Nm" "Sy" bold .No ". b Nm" .No "." diff --git a/regress/usr.bin/mandoc/mdoc/No/punct.out_ascii b/regress/usr.bin/mandoc/mdoc/No/punct.out_ascii index eca39c42e46..94252d88d06 100644 --- a/regress/usr.bin/mandoc/mdoc/No/punct.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/No/punct.out_ascii @@ -21,6 +21,6 @@ DDEESSCCRRIIPPTTIIOONN Multiple punctuation: [(arg)]. - Quoted: a . b Nm . b Nm . + Quoted: a . b Nm bboolldd . b Nm . OpenBSD November 17, 2014 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/No/punct.out_lint b/regress/usr.bin/mandoc/mdoc/No/punct.out_lint index cd2fd00f064..e46cd67fd5b 100644 --- a/regress/usr.bin/mandoc/mdoc/No/punct.out_lint +++ b/regress/usr.bin/mandoc/mdoc/No/punct.out_lint @@ -22,3 +22,4 @@ mandoc: punct.in:70:7: WARNING: skipping empty macro: No mandoc: punct.in:71:7: WARNING: skipping empty macro: No mandoc: punct.in:74:7: WARNING: skipping empty macro: No mandoc: punct.in:75:7: WARNING: skipping empty macro: No +mandoc: punct.in:83:2: WARNING: skipping empty macro: No diff --git a/regress/usr.bin/mandoc/mdoc/No/punct.out_markdown b/regress/usr.bin/mandoc/mdoc/No/punct.out_markdown index 6861d214c6d..6dd09c85d95 100644 --- a/regress/usr.bin/mandoc/mdoc/No/punct.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/No/punct.out_markdown @@ -79,7 +79,7 @@ Multiple punctuation: \[(arg)]. Quoted: -a . b Nm +a . b Nm **bold** . b Nm . diff --git a/regress/usr.bin/mandoc/mdoc/Ns/punct.in b/regress/usr.bin/mandoc/mdoc/Ns/punct.in index d55cd32244d..20cfe5ccc2b 100644 --- a/regress/usr.bin/mandoc/mdoc/Ns/punct.in +++ b/regress/usr.bin/mandoc/mdoc/Ns/punct.in @@ -8,6 +8,6 @@ Normal words: .No no Ns ns No no Opening punctuation: -.No no Ns ( ns No no +.No no Ns "(" ns No no Closing punctuation: -.No no Ns ns ) No no +.No no "Ns" ns ")" No no diff --git a/regress/usr.bin/mandoc/mdoc/Oo/punct.in b/regress/usr.bin/mandoc/mdoc/Oo/punct.in index c9e9d7327ae..59ea4bb7cb1 100644 --- a/regress/usr.bin/mandoc/mdoc/Oo/punct.in +++ b/regress/usr.bin/mandoc/mdoc/Oo/punct.in @@ -6,13 +6,13 @@ .Nd punctuation handling by the Oo macro .Sh DESCRIPTION at the beginning: -.Oo ( z +.Oo "(" z .Oo | z .Oo . z -.Oc Oc Oc +.Oc Oc "Sy" bold Oc .Pp in the middle: -.Oo a ( z +.Oo a "(" z .Oo a | z .Oo a . z .Oc Oc Oc diff --git a/regress/usr.bin/mandoc/mdoc/Oo/punct.out_ascii b/regress/usr.bin/mandoc/mdoc/Oo/punct.out_ascii index ca487cf65a0..68addf8d9db 100644 --- a/regress/usr.bin/mandoc/mdoc/Oo/punct.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/Oo/punct.out_ascii @@ -4,7 +4,7 @@ NNAAMMEE OOoo--ppuunncctt - punctuation handling by the Oo macro DDEESSCCRRIIPPTTIIOONN - at the beginning: ([z [| z [. z]]] + at the beginning: ([z [| z [. z]] bboolldd] in the middle: [a (z [a | z [a. z]]] diff --git a/regress/usr.bin/mandoc/mdoc/Oo/punct.out_markdown b/regress/usr.bin/mandoc/mdoc/Oo/punct.out_markdown index befa71f3cd2..e6525b1dcdc 100644 --- a/regress/usr.bin/mandoc/mdoc/Oo/punct.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/Oo/punct.out_markdown @@ -9,7 +9,7 @@ OO-PUNCT(1) - General Commands Manual at the beginning: (\[z \[| z -\[. z]]] +\[. z]] **bold**] in the middle: \[a (z diff --git a/regress/usr.bin/mandoc/mdoc/Op/punct.in b/regress/usr.bin/mandoc/mdoc/Op/punct.in index 02a25c9c0ca..7bc993320ad 100644 --- a/regress/usr.bin/mandoc/mdoc/Op/punct.in +++ b/regress/usr.bin/mandoc/mdoc/Op/punct.in @@ -6,12 +6,12 @@ .Nd punctuation handling by the Op macro .Sh DESCRIPTION at the beginning: -.Op ( z +.Op "(" z .Op | z .Op . z .Pp in the middle: -.Op a ( z +.Op a "(" z .Op a | z .Op a . z .Pp diff --git a/regress/usr.bin/mandoc/mdoc/Pa/punct.in b/regress/usr.bin/mandoc/mdoc/Pa/punct.in index ea6c81ffa29..c243d74286b 100644 --- a/regress/usr.bin/mandoc/mdoc/Pa/punct.in +++ b/regress/usr.bin/mandoc/mdoc/Pa/punct.in @@ -37,3 +37,6 @@ op paren .Pa ( a op bracket .Pa [ a +.Pp +quoted punctuation: +.Pa a "(" b "|" c ")" d "," "Sy" bold . diff --git a/regress/usr.bin/mandoc/mdoc/Pa/punct.out_ascii b/regress/usr.bin/mandoc/mdoc/Pa/punct.out_ascii index 65b247e9dd0..ee2a7ed6b96 100644 --- a/regress/usr.bin/mandoc/mdoc/Pa/punct.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/Pa/punct.out_ascii @@ -8,4 +8,6 @@ DDEESSCCRRIIPPTTIIOONN start _~) _z dot _~. _z comma _~, _z semicolon _~; _z colon _~: _z quest _~? _z excl _~! _z paren _~) _z bracket _~] _z bar | _m op paren (_a op bracket [_a + quoted punctuation: _a (_b | _c) _d, bboolldd. + OpenBSD August 21, 2014 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Pa/punct.out_markdown b/regress/usr.bin/mandoc/mdoc/Pa/punct.out_markdown index e7b05033744..3730d72401f 100644 --- a/regress/usr.bin/mandoc/mdoc/Pa/punct.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/Pa/punct.out_markdown @@ -39,4 +39,7 @@ op paren op bracket \[*a* +quoted punctuation: +*a* (*b* | *c*) *d*, **bold**. + OpenBSD - August 21, 2014 diff --git a/regress/usr.bin/mandoc/mdoc/Qq/empty.in b/regress/usr.bin/mandoc/mdoc/Qq/empty.in index 58d6bf3dee4..81bd207e59e 100644 --- a/regress/usr.bin/mandoc/mdoc/Qq/empty.in +++ b/regress/usr.bin/mandoc/mdoc/Qq/empty.in @@ -8,7 +8,7 @@ An empty .Qq and a full -.Qq user@host +.Qq "(" user@host quotation. And another -.Qo full Qc one . +.Qo "(" full Qc one "Sy" bold . diff --git a/regress/usr.bin/mandoc/mdoc/Qq/empty.out_ascii b/regress/usr.bin/mandoc/mdoc/Qq/empty.out_ascii index 311f1e94b41..a191f455050 100644 --- a/regress/usr.bin/mandoc/mdoc/Qq/empty.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/Qq/empty.out_ascii @@ -4,6 +4,7 @@ NNAAMMEE QQqq--eemmppttyy - empty implicit enclosure macros DDEESSCCRRIIPPTTIIOONN - An empty "" and a full "user@host" quotation. And another "full" one. + An empty "" and a full ("user@host" quotation. And another ("full" one + bboolldd. OpenBSD October 21, 2010 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Qq/empty.out_markdown b/regress/usr.bin/mandoc/mdoc/Qq/empty.out_markdown index 262ae04d9b2..beb8cb30117 100644 --- a/regress/usr.bin/mandoc/mdoc/Qq/empty.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/Qq/empty.out_markdown @@ -9,9 +9,9 @@ QQ-EMPTY(1) - General Commands Manual An empty "" and a full -"user@host" +("user@host" quotation. And another -"full" one. +("full" one **bold**. OpenBSD - October 21, 2010 diff --git a/regress/usr.bin/mandoc/mdoc/Sq/empty.in b/regress/usr.bin/mandoc/mdoc/Sq/empty.in index 00af9a27e74..4a8cd1e17db 100644 --- a/regress/usr.bin/mandoc/mdoc/Sq/empty.in +++ b/regress/usr.bin/mandoc/mdoc/Sq/empty.in @@ -8,7 +8,7 @@ An empty .Sq and a full -.Sq user@host +.Sq "(" user@host quotation. And another -.So full Sc one . +.So "(" full Sc one "Sy" bold . diff --git a/regress/usr.bin/mandoc/mdoc/Sq/empty.out_ascii b/regress/usr.bin/mandoc/mdoc/Sq/empty.out_ascii index 4ca5e846d42..cf0144203cf 100644 --- a/regress/usr.bin/mandoc/mdoc/Sq/empty.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/Sq/empty.out_ascii @@ -4,6 +4,7 @@ NNAAMMEE SSqq--eemmppttyy - empty implicit enclosure macros DDEESSCCRRIIPPTTIIOONN - An empty `' and a full `user@host' quotation. And another `full' one. + An empty `' and a full (`user@host' quotation. And another (`full' one + bboolldd. OpenBSD October 21, 2010 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Sq/empty.out_markdown b/regress/usr.bin/mandoc/mdoc/Sq/empty.out_markdown index 34a3fcbf237..1da780b41b2 100644 --- a/regress/usr.bin/mandoc/mdoc/Sq/empty.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/Sq/empty.out_markdown @@ -9,9 +9,9 @@ SQ-EMPTY(1) - General Commands Manual An empty '' and a full -'user@host' +('user@host' quotation. And another -'full' one. +('full' one **bold**. OpenBSD - October 21, 2010 diff --git a/regress/usr.bin/mandoc/mdoc/St/call.in b/regress/usr.bin/mandoc/mdoc/St/call.in index 10a45d3ad3e..26dc494a323 100644 --- a/regress/usr.bin/mandoc/mdoc/St/call.in +++ b/regress/usr.bin/mandoc/mdoc/St/call.in @@ -6,7 +6,7 @@ .Nd the standard macro calling other macros .Sh STANDARDS calling another macro: -.St Fl called +.St "Fl" called .Pp valid argument: .St -p1003.1-2004 diff --git a/regress/usr.bin/mandoc/mdoc/Sx/noarg.in b/regress/usr.bin/mandoc/mdoc/Sx/noarg.in index 35c4a64ef73..f2126b7a40b 100644 --- a/regress/usr.bin/mandoc/mdoc/Sx/noarg.in +++ b/regress/usr.bin/mandoc/mdoc/Sx/noarg.in @@ -6,7 +6,7 @@ .Nd internal cross reference without a target .Sh DESCRIPTION with target: -.Sx DESCRIPTION +.Sx DESCRIPTION ";" "Em" italic no target: .Sx end of test document diff --git a/regress/usr.bin/mandoc/mdoc/Sx/noarg.out_ascii b/regress/usr.bin/mandoc/mdoc/Sx/noarg.out_ascii index 343ab0071f2..e3adc0bcc89 100644 --- a/regress/usr.bin/mandoc/mdoc/Sx/noarg.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/Sx/noarg.out_ascii @@ -4,6 +4,6 @@ NNAAMMEE SSxx--nnooaarrgg - internal cross reference without a target DDEESSCCRRIIPPTTIIOONN - with target: _D_E_S_C_R_I_P_T_I_O_N no target: end of test document + with target: _D_E_S_C_R_I_P_T_I_O_N; _i_t_a_l_i_c no target: end of test document OpenBSD January 19, 2011 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Sx/noarg.out_markdown b/regress/usr.bin/mandoc/mdoc/Sx/noarg.out_markdown index 0271546fe88..d3184519a78 100644 --- a/regress/usr.bin/mandoc/mdoc/Sx/noarg.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/Sx/noarg.out_markdown @@ -7,7 +7,7 @@ SX-NOARG(1) - General Commands Manual # DESCRIPTION with target: -*DESCRIPTION* +*DESCRIPTION*; *italic* no target: end of test document diff --git a/regress/usr.bin/mandoc/mdoc/Sy/punct.in b/regress/usr.bin/mandoc/mdoc/Sy/punct.in index 4f51886b0ad..764e8aba7ed 100644 --- a/regress/usr.bin/mandoc/mdoc/Sy/punct.in +++ b/regress/usr.bin/mandoc/mdoc/Sy/punct.in @@ -7,7 +7,7 @@ .Sh DESCRIPTION Leading punctuation: .Sy ( b -.Sy [ b +.Sy "[" b .Sy | b .Sy . b .Sy , b @@ -28,13 +28,13 @@ Trailing punctuation: .Sy a : .Sy a ? .Sy a ! -.Sy a ) +.Sy a ")" .Sy a ] .Pp Middle punctuation: .Sy a ( b .Sy a [ b -.Sy a | b +.Sy a "|" b .Sy a . b .Sy a , b .Sy a ; b @@ -78,5 +78,6 @@ Multiple punctuation: .Sy [ ( arg ) ] . .Pp Quoted: -.Sy "a . b Nm" +.Sy "a . b Nm" "Em" italic .Sy ". b Nm" +.Sy "." diff --git a/regress/usr.bin/mandoc/mdoc/Sy/punct.out_ascii b/regress/usr.bin/mandoc/mdoc/Sy/punct.out_ascii index 39bed0ba4e8..2f368573d1f 100644 --- a/regress/usr.bin/mandoc/mdoc/Sy/punct.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/Sy/punct.out_ascii @@ -21,6 +21,6 @@ DDEESSCCRRIIPPTTIIOONN Multiple punctuation: [(aarrgg)]. - Quoted: aa .. bb NNmm .. bb NNmm + Quoted: aa .. bb NNmm _i_t_a_l_i_c .. bb NNmm . OpenBSD November 17, 2014 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Sy/punct.out_lint b/regress/usr.bin/mandoc/mdoc/Sy/punct.out_lint index 0073a308f6f..31f1d56566d 100644 --- a/regress/usr.bin/mandoc/mdoc/Sy/punct.out_lint +++ b/regress/usr.bin/mandoc/mdoc/Sy/punct.out_lint @@ -22,3 +22,4 @@ mandoc: punct.in:70:7: WARNING: skipping empty macro: Sy mandoc: punct.in:71:7: WARNING: skipping empty macro: Sy mandoc: punct.in:74:7: WARNING: skipping empty macro: Sy mandoc: punct.in:75:7: WARNING: skipping empty macro: Sy +mandoc: punct.in:83:2: WARNING: skipping empty macro: Sy diff --git a/regress/usr.bin/mandoc/mdoc/Sy/punct.out_markdown b/regress/usr.bin/mandoc/mdoc/Sy/punct.out_markdown index 8d91555dc5e..5e3a0c1ca44 100644 --- a/regress/usr.bin/mandoc/mdoc/Sy/punct.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/Sy/punct.out_markdown @@ -79,7 +79,8 @@ Multiple punctuation: \[(**arg**)]. Quoted: -**a . b Nm** +**a . b Nm** *italic* **. b Nm** +. OpenBSD - November 17, 2014 diff --git a/regress/usr.bin/mandoc/mdoc/Tn/noarg.in b/regress/usr.bin/mandoc/mdoc/Tn/noarg.in index 1d18a95b0fd..6465042b5cd 100644 --- a/regress/usr.bin/mandoc/mdoc/Tn/noarg.in +++ b/regress/usr.bin/mandoc/mdoc/Tn/noarg.in @@ -6,7 +6,7 @@ .Nd trade name macro without argument .Sh DESCRIPTION with argument -.Tn IBM +.Tn IBM "," "Em" italic no argument .Tn end of test document diff --git a/regress/usr.bin/mandoc/mdoc/Tn/noarg.out_ascii b/regress/usr.bin/mandoc/mdoc/Tn/noarg.out_ascii index 1333a900311..2fc5b4e4370 100644 --- a/regress/usr.bin/mandoc/mdoc/Tn/noarg.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/Tn/noarg.out_ascii @@ -4,6 +4,6 @@ NNAAMMEE TTnn--nnooaarrgg - trade name macro without argument DDEESSCCRRIIPPTTIIOONN - with argument IBM no argument end of test document + with argument IBM, _i_t_a_l_i_c no argument end of test document OpenBSD January 19, 2011 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Tn/noarg.out_markdown b/regress/usr.bin/mandoc/mdoc/Tn/noarg.out_markdown index 64641d63e39..2ff512c7d34 100644 --- a/regress/usr.bin/mandoc/mdoc/Tn/noarg.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/Tn/noarg.out_markdown @@ -7,7 +7,7 @@ TN-NOARG(1) - General Commands Manual # DESCRIPTION with argument -`IBM` +`IBM`, *italic* no argument end of test document diff --git a/regress/usr.bin/mandoc/mdoc/Va/Makefile b/regress/usr.bin/mandoc/mdoc/Va/Makefile index e207ffad2b1..b8796a8db38 100644 --- a/regress/usr.bin/mandoc/mdoc/Va/Makefile +++ b/regress/usr.bin/mandoc/mdoc/Va/Makefile @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile,v 1.5 2017/03/08 22:53:36 schwarze Exp $ +# $OpenBSD: Makefile,v 1.6 2017/05/30 16:21:08 schwarze Exp $ -REGRESS_TARGETS = basic font noarg +REGRESS_TARGETS = basic font noarg punct LINT_TARGETS = noarg .include diff --git a/regress/usr.bin/mandoc/mdoc/Va/punct.in b/regress/usr.bin/mandoc/mdoc/Va/punct.in new file mode 100644 index 00000000000..198e95ae818 --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Va/punct.in @@ -0,0 +1,42 @@ +.Dd August 21, 2014 +.Dt AR-PUNCT 1 +.Os OpenBSD +.Sh NAME +.Nm Va-punct +.Nd punctuation handling by the Va macro +.Sh DESCRIPTION +closing punctuation +.Va a ) +only one +.Va ) +only more than one +.Va ) ) +middle +.Va a ) z +start +.Va ) z +dot +.Va . z +comma +.Va , z +semicolon +.Va ; z +colon +.Va : z +quest +.Va ? z +excl +.Va ! z +paren +.Va ) z +bracket +.Va ] z +bar +.Va | m +op paren +.Va ( a +op bracket +.Va [ a +.Pp +quoted punctuation: +.Va a "(" b "|" c ")" d "," "Sy" bold . diff --git a/regress/usr.bin/mandoc/mdoc/Va/punct.out_ascii b/regress/usr.bin/mandoc/mdoc/Va/punct.out_ascii new file mode 100644 index 00000000000..a333c7ee87c --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Va/punct.out_ascii @@ -0,0 +1,13 @@ +AR-PUNCT(1) General Commands Manual AR-PUNCT(1) + +NNAAMMEE + VVaa--ppuunncctt - punctuation handling by the Va macro + +DDEESSCCRRIIPPTTIIOONN + closing punctuation _a) only one ) only more than one )) middle _a) _z start + ) _z dot . _z comma , _z semicolon ; _z colon : _z quest ? _z excl ! _z paren ) + _z bracket ] _z bar | _m op paren (_a op bracket [_a + + quoted punctuation: _a (_b | _c) _d, bboolldd. + +OpenBSD August 21, 2014 OpenBSD diff --git a/regress/usr.bin/mandoc/mdoc/Va/punct.out_markdown b/regress/usr.bin/mandoc/mdoc/Va/punct.out_markdown new file mode 100644 index 00000000000..772793f0a24 --- /dev/null +++ b/regress/usr.bin/mandoc/mdoc/Va/punct.out_markdown @@ -0,0 +1,45 @@ +AR-PUNCT(1) - General Commands Manual + +# NAME + +**Va-punct** - punctuation handling by the Va macro + +# DESCRIPTION + +closing punctuation +*a*) +only one +) +only more than one +)) +middle +*a*) *z* +start +) *z* +dot +. *z* +comma +, *z* +semicolon +; *z* +colon +: *z* +quest +? *z* +excl +! *z* +paren +) *z* +bracket +] *z* +bar +| *m* +op paren +(*a* +op bracket +\[*a* + +quoted punctuation: +*a* (*b* | *c*) *d*, **bold**. + +OpenBSD - August 21, 2014 diff --git a/regress/usr.bin/mandoc/mdoc/Xr/args.in b/regress/usr.bin/mandoc/mdoc/Xr/args.in index 97e68202de0..3124ed51f88 100644 --- a/regress/usr.bin/mandoc/mdoc/Xr/args.in +++ b/regress/usr.bin/mandoc/mdoc/Xr/args.in @@ -8,13 +8,13 @@ One single .Xr echo 1 is fine, and so is an -.Xr echo 1 followed by something else. +.Xr echo 1 followed by something "Em" else . .Pp But listen for multiple .Xr echo 1 Ns s . .Pp A call, an -.Xr echo 1 , and +.Xr "(" echo 1 ")" , and another .Xr echo 1 . .Pp diff --git a/regress/usr.bin/mandoc/mdoc/Xr/args.out_ascii b/regress/usr.bin/mandoc/mdoc/Xr/args.out_ascii index 81fe8784d59..67e8b712107 100644 --- a/regress/usr.bin/mandoc/mdoc/Xr/args.out_ascii +++ b/regress/usr.bin/mandoc/mdoc/Xr/args.out_ascii @@ -5,11 +5,11 @@ NNAAMMEE DDEESSCCRRIIPPTTIIOONN One single echo(1) is fine, and so is an echo(1) followed by something - else. + _e_l_s_e. But listen for multiple echo(1)s. - A call, an echo(1), and another echo(1). + A call, an (echo(1)), and another echo(1). Finally, half an echo, no echo and no echo at all. diff --git a/regress/usr.bin/mandoc/mdoc/Xr/args.out_markdown b/regress/usr.bin/mandoc/mdoc/Xr/args.out_markdown index bc102f58be0..fdfaa8d3280 100644 --- a/regress/usr.bin/mandoc/mdoc/Xr/args.out_markdown +++ b/regress/usr.bin/mandoc/mdoc/Xr/args.out_markdown @@ -9,13 +9,13 @@ XR-ARGS(1) - General Commands Manual One single echo(1) is fine, and so is an -echo(1) followed by something else. +echo(1) followed by something *else*. But listen for multiple echo(1)s. A call, an -echo(1), and +(echo(1)), and another echo(1). diff --git a/usr.bin/mandoc/libmdoc.h b/usr.bin/mandoc/libmdoc.h index 708f3a15263..8c86af69609 100644 --- a/usr.bin/mandoc/libmdoc.h +++ b/usr.bin/mandoc/libmdoc.h @@ -1,4 +1,4 @@ -/* $OpenBSD: libmdoc.h,v 1.82 2017/04/29 12:43:55 schwarze Exp $ */ +/* $OpenBSD: libmdoc.h,v 1.83 2017/05/30 16:21:07 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2013, 2014, 2015, 2017 Ingo Schwarze @@ -39,7 +39,6 @@ enum margserr { ARGS_EOLN, /* end-of-line */ ARGS_WORD, /* normal word */ ARGS_PUNCT, /* series of punctuation */ - ARGS_QWORD, /* quoted word */ ARGS_PHRASE /* Bl -column phrase */ }; diff --git a/usr.bin/mandoc/mdoc_argv.c b/usr.bin/mandoc/mdoc_argv.c index 30b5061c38e..bd9984ca1a9 100644 --- a/usr.bin/mandoc/mdoc_argv.c +++ b/usr.bin/mandoc/mdoc_argv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mdoc_argv.c,v 1.70 2017/05/05 15:16:25 schwarze Exp $ */ +/* $OpenBSD: mdoc_argv.c,v 1.71 2017/05/30 16:21:07 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2012, 2014-2017 Ingo Schwarze @@ -553,14 +553,14 @@ args(struct roff_man *mdoc, int line, int *pos, if ( ! (mdoc->flags & MDOC_PHRASE)) mandoc_msg(MANDOCERR_ARG_QUOTE, mdoc->parse, line, *pos, NULL); - return ARGS_QWORD; + return ARGS_WORD; } mdoc->flags &= ~MDOC_PHRASELIT; buf[(*pos)++] = '\0'; if ('\0' == buf[*pos]) - return ARGS_QWORD; + return ARGS_WORD; while (' ' == buf[*pos]) (*pos)++; @@ -569,7 +569,7 @@ args(struct roff_man *mdoc, int line, int *pos, mandoc_msg(MANDOCERR_SPACE_EOL, mdoc->parse, line, *pos, NULL); - return ARGS_QWORD; + return ARGS_WORD; } p = &buf[*pos]; diff --git a/usr.bin/mandoc/mdoc_macro.c b/usr.bin/mandoc/mdoc_macro.c index 92f334eab34..b78b3ed43cd 100644 --- a/usr.bin/mandoc/mdoc_macro.c +++ b/usr.bin/mandoc/mdoc_macro.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mdoc_macro.c,v 1.180 2017/05/05 15:16:25 schwarze Exp $ */ +/* $OpenBSD: mdoc_macro.c,v 1.181 2017/05/30 16:21:07 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010, 2012-2017 Ingo Schwarze @@ -74,7 +74,8 @@ const struct mdoc_macro __mdoc_macros[MDOC_MAX - MDOC_Dd] = { { blk_full, MDOC_PARSED | MDOC_JOIN }, /* It */ { in_line, MDOC_CALLABLE | MDOC_PARSED }, /* Ad */ { in_line, MDOC_CALLABLE | MDOC_PARSED | MDOC_JOIN }, /* An */ - { in_line_argn, MDOC_CALLABLE | MDOC_PARSED | MDOC_JOIN }, /* Ap */ + { in_line_argn, MDOC_CALLABLE | MDOC_PARSED | + MDOC_IGNDELIM | MDOC_JOIN }, /* Ap */ { in_line, MDOC_CALLABLE | MDOC_PARSED }, /* Ar */ { in_line, MDOC_CALLABLE | MDOC_PARSED | MDOC_JOIN }, /* Cd */ { in_line, MDOC_CALLABLE | MDOC_PARSED }, /* Cm */ @@ -710,8 +711,7 @@ blk_exp_close(MACRO_PROT_ARGS) if (ac == ARGS_PUNCT || ac == ARGS_EOLN) break; - ntok = ac == ARGS_QWORD ? TOKEN_NONE : - lookup(mdoc, tok, line, lastarg, p); + ntok = lookup(mdoc, tok, line, lastarg, p); if (ntok == TOKEN_NONE) { dword(mdoc, line, lastarg, p, DELIM_MAX, @@ -807,7 +807,7 @@ in_line(MACRO_PROT_ARGS) break; } - ntok = (ac == ARGS_QWORD || (tok == MDOC_Fn && !cnt)) ? + ntok = (tok == MDOC_Fn && !cnt) ? TOKEN_NONE : lookup(mdoc, tok, line, la, p); /* @@ -836,14 +836,11 @@ in_line(MACRO_PROT_ARGS) } /* - * Non-quote-enclosed punctuation. Set up our scope, if - * a word; rewind the scope, if a delimiter; then append - * the word. + * Handle punctuation. Set up our scope, if a word; + * rewind the scope, if a delimiter; then append the word. */ - d = ac == ARGS_QWORD ? DELIM_NONE : mdoc_isdelim(p); - - if (DELIM_NONE != d) { + if ((d = mdoc_isdelim(p)) != DELIM_NONE) { /* * If we encounter closing punctuation, no word * has been emitted, no scope is open, and we're @@ -863,11 +860,12 @@ in_line(MACRO_PROT_ARGS) * Close out our scope, if one is open, before * any punctuation. */ - if (scope) + if (scope && tok != MDOC_Lk) { rew_elem(mdoc, tok); - scope = 0; - if (tok == MDOC_Fn) - mayopen = 0; + scope = 0; + if (tok == MDOC_Fn) + mayopen = 0; + } } else if (mayopen && !scope) { mdoc_elem_alloc(mdoc, line, ppos, tok, arg); scope = 1; @@ -1113,7 +1111,6 @@ blk_full(MACRO_PROT_ARGS) if (head == NULL && ac != ARGS_PHRASE && - ac != ARGS_QWORD && mdoc_isdelim(p) == DELIM_OPEN) { dword(mdoc, line, la, p, DELIM_OPEN, 0); continue; @@ -1210,8 +1207,7 @@ blk_part_imp(MACRO_PROT_ARGS) if (ac == ARGS_EOLN || ac == ARGS_PUNCT) break; - if (body == NULL && ac != ARGS_QWORD && - mdoc_isdelim(p) == DELIM_OPEN) { + if (body == NULL && mdoc_isdelim(p) == DELIM_OPEN) { dword(mdoc, line, la, p, DELIM_OPEN, 0); continue; } @@ -1267,8 +1263,7 @@ blk_part_exp(MACRO_PROT_ARGS) /* Flush out leading punctuation. */ - if (head == NULL && ac != ARGS_QWORD && - mdoc_isdelim(p) == DELIM_OPEN) { + if (head == NULL && mdoc_isdelim(p) == DELIM_OPEN) { dword(mdoc, line, la, p, DELIM_OPEN, 0); continue; } @@ -1367,7 +1362,7 @@ in_line_argn(MACRO_PROT_ARGS) state = -2; } - ntok = (ac == ARGS_QWORD || (tok == MDOC_Pf && state == 0)) ? + ntok = (tok == MDOC_Pf && state == 0) ? TOKEN_NONE : lookup(mdoc, tok, line, la, p); if (ntok != TOKEN_NONE) { @@ -1379,8 +1374,7 @@ in_line_argn(MACRO_PROT_ARGS) break; } - if (ac == ARGS_QWORD || - mdoc_macros[tok].flags & MDOC_IGNDELIM || + if (mdoc_macros[tok].flags & MDOC_IGNDELIM || mdoc_isdelim(p) == DELIM_NONE) { if (state == -1) { mdoc_elem_alloc(mdoc, line, ppos, tok, arg);