aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit6fe7b64a750e5f1ab77532bdf70912db94348867 (patch)
treebee35e6857d85931ee41fbf98fecd8bcb7a7c30d /mdoc_html.c
parent7395993c875be985c06c33cfe915ba3e79cba61f (diff)
downloadmandoc-6fe7b64a750e5f1ab77532bdf70912db94348867.tar.gz
mandoc-6fe7b64a750e5f1ab77532bdf70912db94348867.tar.zst
mandoc-6fe7b64a750e5f1ab77532bdf70912db94348867.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 'mdoc_html.c')
-rw-r--r--mdoc_html.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index 0dc32208..5b0497a8 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.198 2014/08/14 00:31:43 schwarze Exp $ */
+/* $Id: mdoc_html.c,v 1.199 2014/08/21 12:57:17 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -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);