From 767d17838a61fbf6fd09370c4f891c1d6aaccca4 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Thu, 12 Feb 2015 13:00:52 +0000 Subject: Do not confuse .Bl -column lists that just broken another block with newly opened .Bl -column lists; fixing an assertion failure jsg@ found with afl: test case #481, Bl It Bl -column It Bd El text text El --- mdoc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/mdoc.c b/mdoc.c index 92960a2f..027ecbeb 100644 --- a/mdoc.c +++ b/mdoc.c @@ -1,4 +1,4 @@ -/* $Id: mdoc.c,v 1.237 2015/02/12 12:24:33 schwarze Exp $ */ +/* $Id: mdoc.c,v 1.238 2015/02/12 13:00:52 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2012-2015 Ingo Schwarze @@ -601,8 +601,8 @@ mdoc_ptext(struct mdoc *mdoc, int line, char *buf, int offs) * process within its context in the normal way). */ - if (MDOC_Bl == n->tok && MDOC_BODY == n->type && - LIST_column == n->norm->Bl.type) { + if (n->tok == MDOC_Bl && n->type == MDOC_BODY && + n->end == ENDBODY_NOT && n->norm->Bl.type == LIST_column) { /* `Bl' is open without any children. */ mdoc->flags |= MDOC_FREECOL; mdoc_macro(mdoc, MDOC_It, line, offs, &offs, buf); @@ -778,8 +778,8 @@ mdoc_pmacro(struct mdoc *mdoc, int ln, char *buf, int offs) * context around the parsed macro. */ - if (MDOC_Bl == n->tok && MDOC_BODY == n->type && - LIST_column == n->norm->Bl.type) { + if (n->tok == MDOC_Bl && n->type == MDOC_BODY && + n->end == ENDBODY_NOT && n->norm->Bl.type == LIST_column) { mdoc->flags |= MDOC_FREECOL; mdoc_macro(mdoc, MDOC_It, ln, sv, &sv, buf); return(1); -- cgit v1.2.3-56-ge451