diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2013-09-15 18:26:46 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2013-09-15 18:26:46 +0000 |
commit | 8e08c89dd46d82aaf2e087ce16eca0e73c414481 (patch) | |
tree | 77127ee97b2896b3c6d126cada6ce8e6c2a992a6 /mdoc_macro.c | |
parent | 54aca1486c2520e1551a4830dcda4044a7b61228 (diff) | |
download | mandoc-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.c | 3 |
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; |