From b2a9c33559ec13a867fe90dca3e869e33d088e15 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sat, 16 Aug 2014 19:50:37 +0000 Subject: If a stray .It follows .El, we are no longer in the list, even though the list is still the last processed macro. This fixes a regression introduced in mdoc_macro.c rev. 1.138: Ulrich Spoerlein reports that various of their kernel manuals trigger assertions. --- mdoc_macro.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'mdoc_macro.c') diff --git a/mdoc_macro.c b/mdoc_macro.c index 7c804888..4c5bf351 100644 --- a/mdoc_macro.c +++ b/mdoc_macro.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_macro.c,v 1.140 2014/08/10 23:54:41 schwarze Exp $ */ +/* $Id: mdoc_macro.c,v 1.141 2014/08/16 19:50:37 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010, 2012, 2013 Ingo Schwarze @@ -1041,7 +1041,8 @@ blk_full(MACRO_PROT_ARGS) if (tok == MDOC_It) { for (n = mdoc->last; n; n = n->parent) - if (n->tok == MDOC_Bl) + if (n->tok == MDOC_Bl && + ! (n->flags & MDOC_VALID)) break; if (n == NULL) { mandoc_vmsg(MANDOCERR_IT_STRAY, mdoc->parse, -- cgit v1.2.3-56-ge451