summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-12-09 10:32:22 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-12-09 10:32:22 +0000
commit72c5512bd6a340d6c39d25cb26675eac765e8eb3 (patch)
treeafbf5ca2d044ae99edd27ef91c9041807b0f2b9d
parent6caa80c1c85a575d90e6723b17b2adde9689ea71 (diff)
downloadmandoc-72c5512bd6a340d6c39d25cb26675eac765e8eb3.tar.gz
Allow quote macros (`Op', `Aq', `Bq', `Dq', `Pq', `Ql', `Qq', `Sq', and
`Brq') to have zero arguments without warning. This makes sense because the multi-line quote macros (`Oo/Oc' etc.) allow zero children anyway. Furthermore, the documentation doesn't state that they're required to have children. Originally reported by Alex Kozlov, thanks!
-rw-r--r--TODO3
-rw-r--r--mdoc_validate.c18
2 files changed, 9 insertions, 12 deletions
diff --git a/TODO b/TODO
index 45ee1558..f8d43b2e 100644
--- a/TODO
+++ b/TODO
@@ -114,9 +114,6 @@
(e.g., NetBSD mDNSShared/dns-sd.1)
(mdoc_html.c and mdoc_term.c `Nm' handlers can be slightly simplified)
-- allow `Qq', `Dq', `Sq', `Aq', `Bq' to have 0 arguments
- noted by Alex Kozlov 08/06/10 23:05
-
- Have `Sh', `It', `Ss' and others complain if `Pp' is invoked prior to
close (in the post validation) or prior to open (pre). This noted by
jmc@ a thousand years ago.
diff --git a/mdoc_validate.c b/mdoc_validate.c
index 156c67e7..2e4f93f2 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -210,7 +210,7 @@ const struct valids mdoc_valids[MDOC_MAX] = {
{ NULL, posts_defaults }, /* Li */
{ NULL, posts_nd }, /* Nd */
{ NULL, posts_nm }, /* Nm */
- { NULL, posts_wline }, /* Op */
+ { NULL, NULL }, /* Op */
{ NULL, NULL }, /* Ot */
{ NULL, posts_defaults }, /* Pa */
{ pres_std, posts_std }, /* Rv */
@@ -231,18 +231,18 @@ const struct valids mdoc_valids[MDOC_MAX] = {
{ NULL, posts_text }, /* %V */
{ NULL, NULL }, /* Ac */
{ NULL, NULL }, /* Ao */
- { NULL, posts_wline }, /* Aq */
+ { NULL, NULL }, /* Aq */
{ NULL, posts_at }, /* At */
{ NULL, NULL }, /* Bc */
{ NULL, posts_bf }, /* Bf */
{ NULL, NULL }, /* Bo */
- { NULL, posts_wline }, /* Bq */
+ { NULL, NULL }, /* Bq */
{ NULL, NULL }, /* Bsx */
{ NULL, NULL }, /* Bx */
{ NULL, posts_bool }, /* Db */
{ NULL, NULL }, /* Dc */
{ NULL, NULL }, /* Do */
- { NULL, posts_wline }, /* Dq */
+ { NULL, NULL }, /* Dq */
{ NULL, NULL }, /* Ec */
{ NULL, NULL }, /* Ef */
{ NULL, NULL }, /* Em */
@@ -256,16 +256,16 @@ const struct valids mdoc_valids[MDOC_MAX] = {
{ NULL, NULL }, /* Pc */
{ NULL, posts_text1 }, /* Pf */
{ NULL, NULL }, /* Po */
- { NULL, posts_wline }, /* Pq */
+ { NULL, NULL }, /* Pq */
{ NULL, NULL }, /* Qc */
- { NULL, posts_wline }, /* Ql */
+ { NULL, NULL }, /* Ql */
{ NULL, NULL }, /* Qo */
- { NULL, posts_wline }, /* Qq */
+ { NULL, NULL }, /* Qq */
{ NULL, NULL }, /* Re */
{ NULL, posts_rs }, /* Rs */
{ NULL, NULL }, /* Sc */
{ NULL, NULL }, /* So */
- { NULL, posts_wline }, /* Sq */
+ { NULL, NULL }, /* Sq */
{ NULL, posts_bool }, /* Sm */
{ NULL, posts_text }, /* Sx */
{ NULL, posts_text }, /* Sy */
@@ -287,7 +287,7 @@ const struct valids mdoc_valids[MDOC_MAX] = {
{ NULL, posts_notext }, /* Lp */
{ NULL, posts_text }, /* Lk */
{ NULL, posts_defaults }, /* Mt */
- { NULL, posts_wline }, /* Brq */
+ { NULL, NULL }, /* Brq */
{ NULL, NULL }, /* Bro */
{ NULL, NULL }, /* Brc */
{ NULL, posts_text }, /* %C */