summaryrefslogtreecommitdiff
path: root/usr.bin/mandoc/mdoc_validate.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/mandoc/mdoc_validate.c')
-rw-r--r--usr.bin/mandoc/mdoc_validate.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/mandoc/mdoc_validate.c b/usr.bin/mandoc/mdoc_validate.c
index 9ff94ee2628..60564525cf3 100644
--- a/usr.bin/mandoc/mdoc_validate.c
+++ b/usr.bin/mandoc/mdoc_validate.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_validate.c,v 1.139 2014/07/02 13:10:15 schwarze Exp $ */
+/* $Id: mdoc_validate.c,v 1.140 2014/07/02 19:54:39 schwarze Exp $ */
/*
* Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -1664,11 +1664,12 @@ ebool(struct mdoc *mdoc)
{
if (NULL == mdoc->last->child) {
- mdoc_nmsg(mdoc, mdoc->last, MANDOCERR_MACROEMPTY);
- mdoc_node_delete(mdoc, mdoc->last);
+ if (MDOC_Sm == mdoc->last->tok)
+ mdoc->flags ^= MDOC_SMOFF;
return(1);
}
- check_count(mdoc, MDOC_ELEM, CHECK_WARN, CHECK_EQ, 1);
+
+ check_count(mdoc, MDOC_ELEM, CHECK_WARN, CHECK_LT, 2);
assert(MDOC_TEXT == mdoc->last->child->type);