summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mdoc_validate.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c
index 48d1fd0f..1a36052a 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -886,9 +886,10 @@ post_display(POST_ARGS)
n = mdoc->last;
switch (n->type) {
case ROFFT_BODY:
- if (n->end != ENDBODY_NOT)
- break;
- if (n->child == NULL)
+ if (n->end != ENDBODY_NOT) {
+ if (n->tok == MDOC_Bd && n->parent->args == NULL)
+ roff_node_delete(mdoc, n);
+ } else if (n->child == NULL)
mandoc_msg(MANDOCERR_BLK_EMPTY, mdoc->parse,
n->line, n->pos, mdoc_macronames[n->tok]);
else if (n->tok == MDOC_D1)