From 7f36e58ef077e2bf3ff4592144b6be7ccc0db8de Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Fri, 16 Oct 2020 17:22:43 +0000 Subject: In HTML output, avoid printing a newline right after
 and right
 before 
because that resulted in vertical whitespace not requested by the manual page author. Formatting bug reported by Aman Verma on discuss@. --- mdoc_html.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'mdoc_html.c') diff --git a/mdoc_html.c b/mdoc_html.c index d96df6df..0569255b 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.340 2020/04/19 15:16:56 schwarze Exp $ */ +/* $Id: mdoc_html.c,v 1.341 2020/10/16 17:22:43 schwarze Exp $ */ /* * Copyright (c) 2014-2020 Ingo Schwarze * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons @@ -349,12 +349,11 @@ print_mdoc_node(MDOC_ARGS) if (n->type == ROFFT_COMMENT || n->flags & NODE_NOPRT) return; - if (n->flags & NODE_NOFILL) { - html_fillmode(h, ROFF_nf); - if (n->flags & NODE_LINE) - print_endline(h); - } else + if ((n->flags & NODE_NOFILL) == 0) html_fillmode(h, ROFF_fi); + else if (html_fillmode(h, ROFF_nf) == ROFF_nf && + n->tok != ROFF_fi && n->flags & NODE_LINE) + print_endline(h); child = 1; n->flags &= ~NODE_ENDED; -- cgit v1.2.3-56-ge451