summaryrefslogtreecommitdiffstats
path: root/mdoc_html.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_html.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_html.c')
-rw-r--r--mdoc_html.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index 5c26f7ea..3adea09f 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -640,9 +640,10 @@ mdoc_fl_pre(MDOC_ARGS)
print_text(h, "\\-");
- if (n->child)
- h->flags |= HTML_NOSPACE;
- else if (n->next && n->next->line == n->line)
+ if ( ! (n->nchild == 0 &&
+ (n->next == NULL ||
+ n->next->type == MDOC_TEXT ||
+ n->next->flags & MDOC_LINE)))
h->flags |= HTML_NOSPACE;
return(1);