aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_macro.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-08-16 19:50:37 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-08-16 19:50:37 +0000
commitb2a9c33559ec13a867fe90dca3e869e33d088e15 (patch)
tree42f7aa0d93307a484dc882896d59e86d87ce3927 /mdoc_macro.c
parenta005fc4b580b8743c2baaf08bb9fa7792201861b (diff)
downloadmandoc-b2a9c33559ec13a867fe90dca3e869e33d088e15.tar.gz
mandoc-b2a9c33559ec13a867fe90dca3e869e33d088e15.tar.zst
mandoc-b2a9c33559ec13a867fe90dca3e869e33d088e15.zip
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 <uqs at FreeBSD> reports that various of their kernel manuals trigger assertions.
Diffstat (limited to 'mdoc_macro.c')
-rw-r--r--mdoc_macro.c5
1 files changed, 3 insertions, 2 deletions
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 <kristaps@bsd.lv>
* Copyright (c) 2010, 2012, 2013 Ingo Schwarze <schwarze@openbsd.org>
@@ -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,