aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/man_html.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2020-02-12 21:15:53 +0000
committerIngo Schwarze <schwarze@openbsd.org>2020-02-12 21:15:53 +0000
commitf310c7e721d7fcd28f01ab7a5d6ef15f1dd07cf9 (patch)
tree2b25c5360014068da015cdb30cd1559fb2b1aab6 /man_html.c
parentba42c824f753d0bcddc235aab129aae58ec41d1a (diff)
downloadmandoc-f310c7e721d7fcd28f01ab7a5d6ef15f1dd07cf9.tar.gz
mandoc-f310c7e721d7fcd28f01ab7a5d6ef15f1dd07cf9.tar.zst
mandoc-f310c7e721d7fcd28f01ab7a5d6ef15f1dd07cf9.zip
In roff, a space character at the beginning of an input line requires
starting a new output line, and merely starting a new line of HTML code isn't sufficient to achieve that. Solve this in the same way as mdoc_html.c already does it, by printing a <br/> element. Fixing a bug reported by Jason A. Donenfeld <Jason at zx2c4 dot com> in the wg-quick(8) manual page on manpages.debian.org.
Diffstat (limited to 'man_html.c')
-rw-r--r--man_html.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/man_html.c b/man_html.c
index c0a429c5..5ae5d99b 100644
--- a/man_html.c
+++ b/man_html.c
@@ -1,7 +1,7 @@
-/* $Id: man_html.c,v 1.174 2019/04/30 15:53:00 schwarze Exp $ */
+/* $Id: man_html.c,v 1.175 2020/02/12 21:15:53 schwarze Exp $ */
/*
* Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
- * Copyright (c) 2013-2015, 2017-2019 Ingo Schwarze <schwarze@openbsd.org>
+ * Copyright (c) 2013-2015, 2017-2020 Ingo Schwarze <schwarze@openbsd.org>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
@@ -178,7 +178,7 @@ print_man_node(MAN_ARGS)
}
if (*n->string == ' ' && n->flags & NODE_LINE &&
(h->flags & HTML_NONEWLINE) == 0)
- print_endline(h);
+ print_otag(h, TAG_BR, "");
else if (n->flags & NODE_DELIMC)
h->flags |= HTML_NOSPACE;
t = h->tag;