aboutsummaryrefslogtreecommitdiffstatshomepage
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
commit6fe7b64a750e5f1ab77532bdf70912db94348867 (patch)
treebee35e6857d85931ee41fbf98fecd8bcb7a7c30d /mdoc_man.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_man.c')
-rw-r--r--mdoc_man.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/mdoc_man.c b/mdoc_man.c
index 62c7cec2..6fa424ae 100644
--- a/mdoc_man.c
+++ b/mdoc_man.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_man.c,v 1.69 2014/08/10 23:54:41 schwarze Exp $ */
+/* $Id: mdoc_man.c,v 1.70 2014/08/21 12:57:17 schwarze Exp $ */
/*
* Copyright (c) 2011, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
*
@@ -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;
}