From bcae865b5f52b7036c73ea5e88895b9b7e8c6b1e Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sun, 15 Sep 2013 18:26:46 +0000 Subject: [PATCH] Block closing macros do not allocate a new node but finish an existing one, so they miss the clearing of MDOC_NEWLINE in mdoc.c, node_alloc(). Consequently, MDOC_NEWLINE must be cleared before processing the next macro on the same line. This fixes horizontal spacing for input lines beginning like .Oc Ns ... Issue found by Franco Fichtner while working on DragonFly mandoc integration. --- mdoc_macro.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mdoc_macro.c b/mdoc_macro.c index 7e143e02..0a504864 100644 --- a/mdoc_macro.c +++ b/mdoc_macro.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_macro.c,v 1.121 2012/11/19 22:30:58 schwarze Exp $ */ +/* $Id: mdoc_macro.c,v 1.122 2013/09/15 18:26:46 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons * Copyright (c) 2010, 2012 Ingo Schwarze @@ -792,6 +792,9 @@ blk_exp_close(MACRO_PROT_ARGS) return(0); flushed = 1; } + + mdoc->flags &= ~MDOC_NEWLINE; + if ( ! mdoc_macro(mdoc, ntok, line, lastarg, pos, buf)) return(0); break; -- 2.47.1