From f310c7e721d7fcd28f01ab7a5d6ef15f1dd07cf9 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Wed, 12 Feb 2020 21:15:53 +0000 Subject: 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
element. Fixing a bug reported by Jason A. Donenfeld in the wg-quick(8) manual page on manpages.debian.org. --- man_html.c | 6 +++--- 1 file 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 - * Copyright (c) 2013-2015, 2017-2019 Ingo Schwarze + * Copyright (c) 2013-2015, 2017-2020 Ingo Schwarze * * 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; -- cgit v1.2.3-56-ge451