From 53029bcbfbab6179bd9e52c6d23fca731cf598d8 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Mon, 31 Dec 2018 08:38:21 +0000 Subject: 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. --- mdoc_validate.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'mdoc_validate.c') diff --git a/mdoc_validate.c b/mdoc_validate.c index d20b2a07..bd697e54 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.368 2018/12/31 07:46:07 schwarze Exp $ */ +/* $Id: mdoc_validate.c,v 1.369 2018/12/31 08:38:21 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010-2018 Ingo Schwarze @@ -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++) -- cgit v1.2.3