summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/mdoc_html.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2014-08-21 12:56:24 +0000
committerschwarze <schwarze@openbsd.org>2014-08-21 12:56:24 +0000
commit26c5d88adc8a57f6a3e483511d81299bb2fc86d3 (patch)
tree28e046e7427b1e81d87abc896951ad2e399a1cd2 /usr.bin/mandoc/mdoc_html.c
parentMake "rcctl status" output match rc.conf(8) format. (diff)
downloadwireguard-openbsd-26c5d88adc8a57f6a3e483511d81299bb2fc86d3.tar.xz
wireguard-openbsd-26c5d88adc8a57f6a3e483511d81299bb2fc86d3.zip
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 'usr.bin/mandoc/mdoc_html.c')
-rw-r--r--usr.bin/mandoc/mdoc_html.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/usr.bin/mandoc/mdoc_html.c b/usr.bin/mandoc/mdoc_html.c
index bad18727622..b1435131240 100644
--- a/usr.bin/mandoc/mdoc_html.c
+++ b/usr.bin/mandoc/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.80 2014/08/14 00:29:12 schwarze Exp $ */
+/* $Id: mdoc_html.c,v 1.81 2014/08/21 12:56:24 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -638,9 +638,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);