From: schwarze Date: Sat, 7 Aug 2010 17:26:11 +0000 (+0000) Subject: In -Thtml output, preserve blank lines at the end of .Bd -literal. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=7c36129609c651117069534730e529a8bab5ff70;p=openbsd In -Thtml output, preserve blank lines at the end of .Bd -literal. Patch from kristaps@, analoguous to mdoc_term.c rev. 1.100. With permission from deraadt@ to still fix bugs in mandoc. --- diff --git a/usr.bin/mandoc/mdoc_html.c b/usr.bin/mandoc/mdoc_html.c index 832f74fe9cd..1f7ef4daa49 100644 --- a/usr.bin/mandoc/mdoc_html.c +++ b/usr.bin/mandoc/mdoc_html.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.27 2010/07/31 21:43:07 schwarze Exp $ */ +/* $Id: mdoc_html.c,v 1.28 2010/08/07 17:26:11 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * @@ -1453,11 +1453,11 @@ mdoc_bd_pre(MDOC_ARGS) print_otag(h, TAG_DIV, 2, tag); for (nn = n->child; nn; nn = nn->next) { - if (nn->prev && nn->prev->line < nn->line) { - print_text(h, "\n"); - h->flags |= HTML_NOSPACE; - } print_mdoc_node(m, nn, h); + if (nn->next && nn->next->line == nn->line) + continue; + print_text(h, "\n"); + h->flags |= HTML_NOSPACE; } return(0);