From 3a00712aa8c23948d8642a9dc110e5107c1a3702 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Thu, 15 Oct 2015 22:27:24 +0000 Subject: When blk_full() handles an .It line in .Bl -column and indirectly calls phrase_ta() to handle a .Ta child macro, advance the body pointer accordingly, such that a subsequent tab character rewinds the right body block and doesn't fail an assertion. That happened when there was nothing between the .Ta and the tab character. Bug reported by tim@ some time ago. --- mdoc_macro.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'mdoc_macro.c') diff --git a/mdoc_macro.c b/mdoc_macro.c index a7d6ebd8..bb453b6b 100644 --- a/mdoc_macro.c +++ b/mdoc_macro.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_macro.c,v 1.203 2015/10/12 00:08:15 schwarze Exp $ */ +/* $Id: mdoc_macro.c,v 1.204 2015/10/15 22:27:24 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010, 2012-2015 Ingo Schwarze @@ -1108,6 +1108,11 @@ blk_full(MACRO_PROT_ARGS) mdoc->flags |= MDOC_PPHRASE; parse_rest(mdoc, TOKEN_NONE, line, &la, buf); mdoc->flags &= ~MDOC_PPHRASE; + + /* There may have been `Ta' macros. */ + + while (body->next != NULL) + body = body->next; continue; } -- cgit v1.2.3