diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2010-07-02 17:42:23 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2010-07-02 17:42:23 +0000 |
commit | af82aefcd1d38873de366d50628b21b3ce3c5f01 (patch) | |
tree | 6b9595949d8b242dce3edea76d53ede0c11c759e /mdoc_validate.c | |
parent | bd7b99562ebb68adda0d9219a79d4eebc159b835 (diff) | |
download | mandoc-af82aefcd1d38873de366d50628b21b3ce3c5f01.tar.gz mandoc-af82aefcd1d38873de366d50628b21b3ce3c5f01.tar.zst mandoc-af82aefcd1d38873de366d50628b21b3ce3c5f01.zip |
Not only for -tag lists, but for -hang, -ohang, -inset, -diag,
and -item list as well, empty bodies are OK, they do not even
warrant a warning, much less the error they were throwing.
According to kristaps, joerg@ also brought this up some time ago.
ok kristaps@ jmc@
Diffstat (limited to 'mdoc_validate.c')
-rw-r--r-- | mdoc_validate.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c index 89801d52..29f486dc 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.107 2010/07/02 15:03:14 kristaps Exp $ */ +/* $Id: mdoc_validate.c,v 1.108 2010/07/02 17:42:23 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@bsd.lv> * @@ -1132,9 +1132,6 @@ post_it(POST_ARGS) if (NULL == mdoc->last->head->child) if ( ! mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_NOARGS)) return(0); - if (NULL == mdoc->last->body->child) - if ( ! mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_NOBODY)) - return(0); break; case (LIST_bullet): /* FALLTHROUGH */ @@ -1143,14 +1140,14 @@ post_it(POST_ARGS) case (LIST_enum): /* FALLTHROUGH */ case (LIST_hyphen): + if (NULL == mdoc->last->body->child) + if ( ! mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_NOBODY)) + return(0); /* FALLTHROUGH */ case (LIST_item): if (mdoc->last->head->child) if ( ! mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_ARGSLOST)) return(0); - if (NULL == mdoc->last->body->child) - if ( ! mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_NOBODY)) - return(0); break; case (LIST_column): cols = -1; |