From 0b78a3a44f37b7427013aaf51e6cc2b8888b6406 Mon Sep 17 00:00:00 2001 From: Kristaps Dzonsons Date: Fri, 17 Dec 2010 10:43:51 +0000 Subject: Remove useless DIVs in favour of BRs. Fix `Ex' by having it print a prior BR. Fix `Rv' by only having it print a BR if there's a prior. --- mdoc_html.c | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'mdoc_html.c') diff --git a/mdoc_html.c b/mdoc_html.c index 4f1ee482..f8cece6d 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.126 2010/12/17 10:37:26 kristaps Exp $ */ +/* $Id: mdoc_html.c,v 1.127 2010/12/17 10:43:51 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * @@ -1000,6 +1000,9 @@ mdoc_ex_pre(MDOC_ARGS) struct tag *t; struct htmlpair tag; + if (n->prev) + print_otag(h, TAG_BR, 0, NULL); + PAIR_CLASS_INIT(&tag, "utility"); print_text(h, "The"); @@ -1637,7 +1640,9 @@ mdoc_rv_pre(MDOC_ARGS) struct htmlpair tag; struct tag *t; - print_otag(h, TAG_DIV, 0, NULL); + if (n->prev) + print_otag(h, TAG_BR, 0, NULL); + print_text(h, "The"); for (nn = n->child; nn; nn = nn->next) { @@ -1833,8 +1838,9 @@ mdoc_lb_pre(MDOC_ARGS) { struct htmlpair tag; - if (SEC_LIBRARY == n->sec && MDOC_LINE & n->flags) - print_otag(h, TAG_DIV, 0, NULL); + if (SEC_LIBRARY == n->sec && MDOC_LINE & n->flags && n->prev) + print_otag(h, TAG_BR, 0, NULL); + PAIR_CLASS_INIT(&tag, "lib"); print_otag(h, TAG_SPAN, 1, &tag); return(1); -- cgit v1.2.3