=================================================================== RCS file: /cvs/mandoc/mdoc_html.c,v retrieving revision 1.128 retrieving revision 1.131 diff -u -p -r1.128 -r1.131 --- mandoc/mdoc_html.c 2010/12/17 11:01:24 1.128 +++ mandoc/mdoc_html.c 2010/12/19 12:14:36 1.131 @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.128 2010/12/17 11:01:24 kristaps Exp $ */ +/* $Id: mdoc_html.c,v 1.131 2010/12/19 12:14:36 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * @@ -287,7 +287,7 @@ a2width(const char *p, struct roffsu *su) { if ( ! a2roffsu(p, su, SCALE_MAX)) { - su->unit = SCALE_EM; + su->unit = SCALE_BU; su->scale = (int)strlen(p); } } @@ -354,7 +354,7 @@ a2offs(const char *p, struct roffsu *su) else if (0 == strcmp(p, "indent-two")) SCALE_HS_INIT(su, INDENT * 2); else if ( ! a2roffsu(p, su, SCALE_MAX)) { - su->unit = SCALE_EM; + su->unit = SCALE_BU; su->scale = (int)strlen(p); } } @@ -1064,13 +1064,12 @@ mdoc_d1_pre(MDOC_ARGS) /* BLOCKQUOTE needs a block body. */ - if (MDOC_Dl == n->tok) { + if (MDOC_Dl == n->tok) PAIR_CLASS_INIT(&tag[0], "lit display"); - print_otag(h, TAG_DIV, 1, tag); - } else + else PAIR_CLASS_INIT(&tag[0], "display"); - print_otag(h, TAG_DIV, 1, tag); + print_otag(h, TAG_DIV, 1, tag); return(1); } @@ -1949,7 +1948,8 @@ mdoc_bk_pre(MDOC_ARGS) case (MDOC_HEAD): return(0); case (MDOC_BODY): - h->flags |= HTML_PREKEEP; + if (n->parent->args || 0 == n->prev->nchild) + h->flags |= HTML_PREKEEP; break; default: abort();