aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/man_html.c
diff options
context:
space:
mode:
Diffstat (limited to 'man_html.c')
-rw-r--r--man_html.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/man_html.c b/man_html.c
index 80f69e1a..147c20e4 100644
--- a/man_html.c
+++ b/man_html.c
@@ -1,4 +1,4 @@
-/* $Id: man_html.c,v 1.178 2020/04/04 20:33:33 schwarze Exp $ */
+/* $Id: man_html.c,v 1.179 2020/10/16 17:22:43 schwarze Exp $ */
/*
* Copyright (c) 2013-2015, 2017-2020 Ingo Schwarze <schwarze@openbsd.org>
* Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
@@ -169,7 +169,12 @@ print_man_node(MAN_ARGS)
if (n->type == ROFFT_COMMENT || n->flags & NODE_NOPRT)
return;
- html_fillmode(h, n->flags & NODE_NOFILL ? ROFF_nf : ROFF_fi);
+ if ((n->flags & NODE_NOFILL) == 0)
+ html_fillmode(h, ROFF_fi);
+ else if (html_fillmode(h, ROFF_nf) == ROFF_nf &&
+ n->tok != ROFF_fi && n->flags & NODE_LINE &&
+ (n->prev == NULL || n->prev->tok != MAN_YS))
+ print_endline(h);
child = 1;
switch (n->type) {
@@ -253,13 +258,6 @@ print_man_node(MAN_ARGS)
}
if (t != NULL)
print_stagq(h, t);
-
- if (n->flags & NODE_NOFILL && n->tok != MAN_YS &&
- (n->next != NULL && n->next->flags & NODE_LINE)) {
- /* In .nf = <pre>, print even empty lines. */
- h->col++;
- print_endline(h);
- }
}
static void