diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-05-30 16:22:03 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-05-30 16:22:03 +0000 |
commit | a20be95dec7797c55257792a32b6b39bdbdfe595 (patch) | |
tree | c792fc779fd4c6076766e78fa7644b081e72b26f /regress/mdoc/Cd | |
parent | a81d5d8c62b37fdb8d82d9cebd9cfa044222b9d8 (diff) | |
download | mandoc-a20be95dec7797c55257792a32b6b39bdbdfe595.tar.gz mandoc-a20be95dec7797c55257792a32b6b39bdbdfe595.tar.zst mandoc-a20be95dec7797c55257792a32b6b39bdbdfe595.zip |
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 <leah at vuxu dot org>, found on Void Linux.
Diffstat (limited to 'regress/mdoc/Cd')
-rw-r--r-- | regress/mdoc/Cd/Makefile | 2 | ||||
-rw-r--r-- | regress/mdoc/Cd/punct.in | 42 | ||||
-rw-r--r-- | regress/mdoc/Cd/punct.out_ascii | 13 | ||||
-rw-r--r-- | regress/mdoc/Cd/punct.out_markdown | 45 |
4 files changed, 101 insertions, 1 deletions
diff --git a/regress/mdoc/Cd/Makefile b/regress/mdoc/Cd/Makefile index 164e5964..0792494c 100644 --- a/regress/mdoc/Cd/Makefile +++ b/regress/mdoc/Cd/Makefile @@ -1,6 +1,6 @@ # $OpenBSD: Makefile,v 1.5 2014/07/02 20:18:42 schwarze Exp $ -REGRESS_TARGETS = noarg font eos +REGRESS_TARGETS = eos font noarg punct LINT_TARGETS = noarg .include <bsd.regress.mk> diff --git a/regress/mdoc/Cd/punct.in b/regress/mdoc/Cd/punct.in new file mode 100644 index 00000000..9a072c0c --- /dev/null +++ b/regress/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/mdoc/Cd/punct.out_ascii b/regress/mdoc/Cd/punct.out_ascii new file mode 100644 index 00000000..88d369dc --- /dev/null +++ b/regress/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/mdoc/Cd/punct.out_markdown b/regress/mdoc/Cd/punct.out_markdown new file mode 100644 index 00000000..c39ee621 --- /dev/null +++ b/regress/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 |