summaryrefslogtreecommitdiffstats
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
commit793fa839780278ce837bbf49d61586b868ac4eb4 (patch)
treebdf9c5e7ac9c5be3a969307516a79061e6d31a57 /mdoc_macro.c
parent2aa53e65cd397640a44a8f3489f93ee15a536c54 (diff)
downloadmandoc-793fa839780278ce837bbf49d61586b868ac4eb4.tar.gz
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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c
index 8fa66825..36bd8a09 100644
--- a/mdoc_macro.c
+++ b/mdoc_macro.c
@@ -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,