summaryrefslogtreecommitdiffstats
path: root/mdoc_man.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-08-21 12:57:17 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-08-21 12:57:17 +0000
commit789c95de5c329863a91a87b7615365dddd3a887a (patch)
treed61ec8e6b065eb6b2d0a784f9245bbedbcc5bc45 /mdoc_man.c
parentc5afe1457c884399f540e3898d76a6dac974bcc9 (diff)
downloadmandoc-789c95de5c329863a91a87b7615365dddd3a887a.tar.gz
Right after .Fl, a middle delimiter triggers an empty scope,
just like a closing delimiter. This didn't work in groff-1.15, but it now works in groff-1.22. After being closed by delimiters, .Nm scopes do not reopen. Do not suppress white space after .Fl if the next node is a text node on the same input line; that can happen for middle delimiters. Fixing an issue reported by jmc@.
Diffstat (limited to 'mdoc_man.c')
-rw-r--r--mdoc_man.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/mdoc_man.c b/mdoc_man.c
index 9855c41e..50999427 100644
--- a/mdoc_man.c
+++ b/mdoc_man.c
@@ -1166,7 +1166,8 @@ pre_fl(DECL_ARGS)
font_push('B');
print_word("\\-");
- outflags &= ~MMAN_spc;
+ if (n->nchild)
+ outflags &= ~MMAN_spc;
return(1);
}
@@ -1175,8 +1176,10 @@ post_fl(DECL_ARGS)
{
font_pop();
- if (0 == n->nchild && NULL != n->next &&
- n->next->line == n->line)
+ if ( ! (n->nchild ||
+ n->next == NULL ||
+ n->next->type == MDOC_TEXT ||
+ n->next->flags & MDOC_LINE))
outflags &= ~MMAN_spc;
}