aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-02-12 13:00:52 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-02-12 13:00:52 +0000
commit767d17838a61fbf6fd09370c4f891c1d6aaccca4 (patch)
tree4279956500160ce8df23a05f391cf00531c43110 /mdoc.c
parente89dd22a4fc303f8cdf4180c4fb9655a45e8e724 (diff)
downloadmandoc-767d17838a61fbf6fd09370c4f891c1d6aaccca4.tar.gz
mandoc-767d17838a61fbf6fd09370c4f891c1d6aaccca4.tar.zst
mandoc-767d17838a61fbf6fd09370c4f891c1d6aaccca4.zip
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
Diffstat (limited to 'mdoc.c')
-rw-r--r--mdoc.c10
1 files 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 <kristaps@bsd.lv>
* Copyright (c) 2010, 2012-2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -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);