summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2010-07-02 17:42:23 +0000
committerIngo Schwarze <schwarze@openbsd.org>2010-07-02 17:42:23 +0000
commitf03d36d8c1dfe645afee4acf82c55563966eb83a (patch)
treef25f1bfa3a3e2e9fdbfa463cd67f8a10a14c4580
parent04c0fb6aedd8b530745e03f63c8b188e7d2c7466 (diff)
downloadmandoc-f03d36d8c1dfe645afee4acf82c55563966eb83a.tar.gz
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@
-rw-r--r--mdoc_validate.c9
1 files changed, 3 insertions, 6 deletions
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;