summaryrefslogtreecommitdiffstats
path: root/mdoc_macro.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2013-09-15 18:26:46 +0000
committerIngo Schwarze <schwarze@openbsd.org>2013-09-15 18:26:46 +0000
commit8e08c89dd46d82aaf2e087ce16eca0e73c414481 (patch)
tree77127ee97b2896b3c6d126cada6ce8e6c2a992a6 /mdoc_macro.c
parent54aca1486c2520e1551a4830dcda4044a7b61228 (diff)
downloadmandoc-8e08c89dd46d82aaf2e087ce16eca0e73c414481.tar.gz
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 <franco at lastsummer dot de> while working on DragonFly mandoc integration.
Diffstat (limited to 'mdoc_macro.c')
-rw-r--r--mdoc_macro.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c
index e7ccd62f..bf24a534 100644
--- a/mdoc_macro.c
+++ b/mdoc_macro.c
@@ -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;