summaryrefslogtreecommitdiffstats
path: root/usr.bin/mandoc/man_html.c
diff options
context:
space:
mode:
authorschwarze <schwarze@openbsd.org>2017-05-09 14:09:37 +0000
committerschwarze <schwarze@openbsd.org>2017-05-09 14:09:37 +0000
commit74591f1e552ab9149968418ffe096c81a891092b (patch)
tree488dcfd716c794dedbfd42480b10db843417b453 /usr.bin/mandoc/man_html.c
parentPrevent memory leak on sbuf by freeing it unconditionally and ensure (diff)
downloadwireguard-openbsd-74591f1e552ab9149968418ffe096c81a891092b.tar.xz
wireguard-openbsd-74591f1e552ab9149968418ffe096c81a891092b.zip
Trailing \c suppresses the output line break even if
the next line is a text line starting with whitespace. Quirk found in the sysutils/rancid port.
Diffstat (limited to 'usr.bin/mandoc/man_html.c')
-rw-r--r--usr.bin/mandoc/man_html.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/mandoc/man_html.c b/usr.bin/mandoc/man_html.c
index 7096553943e..20fd4253102 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.94 2017/05/05 15:16:25 schwarze Exp $ */
+/* $OpenBSD: man_html.c,v 1.95 2017/05/09 14:09:37 schwarze Exp $ */
/*
* Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2013, 2014, 2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -249,7 +249,8 @@ print_man_node(MAN_ARGS)
case ROFFT_TEXT:
if (fillmode(h, want_fillmode) == MAN_fi &&
want_fillmode == MAN_fi &&
- n->flags & NODE_LINE && *n->string == ' ')
+ n->flags & NODE_LINE && *n->string == ' ' &&
+ (h->flags & HTML_NONEWLINE) == 0)
print_otag(h, TAG_BR, "");
if (*n->string != '\0')
break;