diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2018-12-31 08:38:21 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2018-12-31 08:38:21 +0000 |
commit | f0d4886b46016e502843d08cf91ed8dc0e5bd086 (patch) | |
tree | 3b204fd3c3ee9b4cbda91678f7a24a1ebae8bfab /mdoc_validate.c | |
parent | bb49c8a742a4e663709d44ec66f5eb01dbba930e (diff) | |
download | mandoc-f0d4886b46016e502843d08cf91ed8dc0e5bd086.tar.gz |
Use the new flag NODE_NOFILL in the validators, which is sometimes
simpler and always more robust. In particular, move the nesting
warnings for .EX and .EE from man_state(), where they were misplaced,
to the man(7) validator.
Diffstat (limited to 'mdoc_validate.c')
-rw-r--r-- | mdoc_validate.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c index b02c17ff..0d5bda4a 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -336,9 +336,7 @@ mdoc_validate(struct roff_man *mdoc) if (n->sec != SEC_SYNOPSIS || (np->tok != MDOC_Cd && np->tok != MDOC_Fd)) check_text(mdoc, n->line, n->pos, n->string); - if (np->tok != MDOC_Ql && np->tok != MDOC_Dl && - (np->tok != MDOC_Bd || - (mdoc->flags & ROFF_NOFILL) == 0) && + if ((n->flags & NODE_NOFILL) == 0 && (np->tok != MDOC_It || np->type != ROFFT_HEAD || np->parent->parent->norm->Bl.type != LIST_diag)) check_text_em(mdoc, n->line, n->pos, n->string); @@ -411,7 +409,7 @@ check_text(struct roff_man *mdoc, int ln, int pos, char *p) { char *cp; - if (mdoc->flags & ROFF_NOFILL) + if (mdoc->last->flags & NODE_NOFILL) return; for (cp = p; NULL != (p = strchr(p, '\t')); p++) |