summaryrefslogtreecommitdiffstats
path: root/mdoc_html.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-12-17 10:43:51 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-12-17 10:43:51 +0000
commite1a4e5ea5e2b4ad66c8d17e8cc2800ba5370a3ec (patch)
treef2aa00edef6485c0e875924c4bf6e85edd6d8a49 /mdoc_html.c
parent8e9871ce2a8bd34b5605daa76493d575ba648258 (diff)
downloadmandoc-e1a4e5ea5e2b4ad66c8d17e8cc2800ba5370a3ec.tar.gz
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.
Diffstat (limited to 'mdoc_html.c')
-rw-r--r--mdoc_html.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index e4040328..1c405de8 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -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);