=================================================================== RCS file: /cvs/mandoc/mdoc_html.c,v retrieving revision 1.53 retrieving revision 1.56 diff -u -p -r1.53 -r1.56 --- mandoc/mdoc_html.c 2010/01/29 14:39:38 1.53 +++ mandoc/mdoc_html.c 2010/04/03 14:25:12 1.56 @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.53 2010/01/29 14:39:38 kristaps Exp $ */ +/* $Id: mdoc_html.c,v 1.56 2010/04/03 14:25:12 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -200,7 +200,7 @@ static const struct htmlmdoc mdocs[MDOC_MAX] = { {NULL, NULL}, /* Dc */ {mdoc_dq_pre, mdoc_dq_post}, /* Do */ {mdoc_dq_pre, mdoc_dq_post}, /* Dq */ - {NULL, NULL}, /* Ec */ + {NULL, NULL}, /* Ec */ /* FIXME: no space */ {NULL, NULL}, /* Ef */ {mdoc_em_pre, NULL}, /* Em */ {NULL, NULL}, /* Eo */ @@ -756,6 +756,9 @@ mdoc_xr_pre(MDOC_ARGS) struct htmlpair tag[2]; const struct mdoc_node *nn; + if (NULL == n->child) + return(0); + PAIR_CLASS_INIT(&tag[0], "link-man"); if (h->base_man) { @@ -1583,7 +1586,7 @@ mdoc_vt_pre(MDOC_ARGS) struct htmlpair tag; struct roffsu su; - if (SEC_SYNOPSIS == n->sec) { + if (MDOC_BLOCK == n->type) { if (n->prev && MDOC_Vt != n->prev->tok) { SCALE_VS_INIT(&su, 1); bufcat_su(h, "margin-top", &su); @@ -1591,7 +1594,10 @@ mdoc_vt_pre(MDOC_ARGS) print_otag(h, TAG_DIV, 1, &tag); } else print_otag(h, TAG_DIV, 0, NULL); - } + + return(1); + } else if (MDOC_HEAD == n->type) + return(0); PAIR_CLASS_INIT(&tag, "type"); print_otag(h, TAG_SPAN, 1, &tag);