summaryrefslogtreecommitdiffstats
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
commited3da15b41e312c05f00a51c74edd1b002c217bf (patch)
tree915770301ef3de40298ae40d7640b34e3e69d60a
parent1d0f2d637cc2cee6b45e3734b1cb714b5320f253 (diff)
downloadmandoc-ed3da15b41e312c05f00a51c74edd1b002c217bf.tar.gz
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.
-rw-r--r--man_html.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/man_html.c b/man_html.c
index a6ad3b43..af942837 100644
--- a/man_html.c
+++ b/man_html.c
@@ -1,7 +1,7 @@
/* $Id$ */
/*
* 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;