=================================================================== RCS file: /cvs/mandoc/mdoc_html.c,v retrieving revision 1.110 retrieving revision 1.114 diff -u -p -r1.110 -r1.114 --- mandoc/mdoc_html.c 2010/10/01 21:51:13 1.110 +++ mandoc/mdoc_html.c 2010/12/05 15:37:30 1.114 @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.110 2010/10/01 21:51:13 schwarze Exp $ */ +/* $Id: mdoc_html.c,v 1.114 2010/12/05 15:37:30 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * @@ -843,7 +843,7 @@ mdoc_xx_pre(MDOC_ARGS) switch (n->tok) { case (MDOC_Bsx): - pp = "BSDI BSD/OS"; + pp = "BSD/OS"; break; case (MDOC_Dx): pp = "DragonFly"; @@ -1323,12 +1323,18 @@ mdoc_bd_pre(MDOC_ARGS) * anyway, so don't sweat it. */ switch (nn->tok) { + case (MDOC_Sm): + /* FALLTHROUGH */ case (MDOC_br): /* FALLTHROUGH */ case (MDOC_sp): /* FALLTHROUGH */ case (MDOC_Bl): /* FALLTHROUGH */ + case (MDOC_D1): + /* FALLTHROUGH */ + case (MDOC_Dl): + /* FALLTHROUGH */ case (MDOC_Lp): /* FALLTHROUGH */ case (MDOC_Pp): @@ -1603,7 +1609,16 @@ mdoc_sm_pre(MDOC_ARGS) assert(n->child && MDOC_TEXT == n->child->type); if (0 == strcmp("on", n->child->string)) { - /* FIXME: no p->col to check... */ + /* + * FIXME: no p->col to check. Thus, if we have + * .Bd -literal + * .Sm off + * 1 2 + * .Sm on + * 3 + * .Ed + * the "3" is preceded by a space. + */ h->flags &= ~HTML_NOSPACE; h->flags &= ~HTML_NONOSPACE; } else @@ -1664,7 +1679,7 @@ mdoc_lk_pre(MDOC_ARGS) PAIR_HREF_INIT(&tag[1], nn->string); print_otag(h, TAG_A, 2, tag); - if (NULL == nn->next) + if (NULL == nn || NULL == nn->next) return(1); for (nn = nn->next; nn; nn = nn->next)