summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/man_html.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2019-01-05 21:52:57 +0000
committerschwarze <schwarze@openbsd.org>2019-01-05 21:52:57 +0000
commit260aa4b1b9f13bde2ff792479f90fb63561cd639 (patch)
tree1092274b541bda4796b0e6df5bb787836eb114ac /usr.bin/mandoc/man_html.c
parentSimplify and clarify (i.e. shrink) code processing (diff)
downloadwireguard-openbsd-260aa4b1b9f13bde2ff792479f90fb63561cd639.tar.xz
wireguard-openbsd-260aa4b1b9f13bde2ff792479f90fb63561cd639.zip
In no-fill mode, avoid bogus blank lines in two situations:
1. After the last child; the parent will take care of the line break. 2. At the .YS macro; the end of the preceding .SY already broke the line.
Diffstat (limited to 'usr.bin/mandoc/man_html.c')
-rw-r--r--usr.bin/mandoc/man_html.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/mandoc/man_html.c b/usr.bin/mandoc/man_html.c
index ba1632c9c6c..d2bf1733fdf 100644
--- a/usr.bin/mandoc/man_html.c
+++ b/usr.bin/mandoc/man_html.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: man_html.c,v 1.117 2019/01/05 09:46:26 schwarze Exp $ */
+/* $OpenBSD: man_html.c,v 1.118 2019/01/05 21:52:57 schwarze Exp $ */
/*
* Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2013-2015, 2017-2019 Ingo Schwarze <schwarze@openbsd.org>
@@ -254,8 +254,8 @@ print_man_node(MAN_ARGS)
/* This will automatically close out any font scope. */
print_stagq(h, t);
- if (n->flags & NODE_NOFILL &&
- (n->next == NULL || n->next->flags & NODE_LINE)) {
+ 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);