diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2020-02-12 21:15:53 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2020-02-12 21:15:53 +0000 |
commit | ed3da15b41e312c05f00a51c74edd1b002c217bf (patch) | |
tree | 915770301ef3de40298ae40d7640b34e3e69d60a | |
parent | 1d0f2d637cc2cee6b45e3734b1cb714b5320f253 (diff) | |
download | mandoc-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.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |