From f03d36d8c1dfe645afee4acf82c55563966eb83a Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 2 Jul 2010 17:42:23 +0000 Subject: 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@ --- mdoc_validate.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'mdoc_validate.c') diff --git a/mdoc_validate.c b/mdoc_validate.c index 3e8e1066..dce10ed0 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -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; -- cgit