=================================================================== RCS file: /cvs/mandoc/tbl_html.c,v retrieving revision 1.1 retrieving revision 1.3 diff -u -p -r1.1 -r1.3 --- mandoc/tbl_html.c 2011/01/04 10:29:41 1.1 +++ mandoc/tbl_html.c 2011/01/05 13:00:11 1.3 @@ -1,4 +1,4 @@ -/* $Id: tbl_html.c,v 1.1 2011/01/04 10:29:41 kristaps Exp $ */ +/* $Id: tbl_html.c,v 1.3 2011/01/05 13:00:11 kristaps Exp $ */ /* * Copyright (c) 2009 Kristaps Dzonsons * @@ -32,7 +32,8 @@ print_tbl(struct html *h, const struct tbl_span *sp) { const struct tbl_head *hp; const struct tbl_dat *dp; - struct tag *tt; + struct tag *tt; + struct htmlpair tag; switch (sp->pos) { case (TBL_SPAN_HORIZ): @@ -48,7 +49,9 @@ print_tbl(struct html *h, const struct tbl_span *sp) h->flags |= HTML_NONOSPACE; h->flags |= HTML_NOSPACE; - print_otag(h, TAG_TABLE, 0, NULL); + PAIR_CLASS_INIT(&tag, "tbl"); + + print_otag(h, TAG_TABLE, 1, &tag); print_otag(h, TAG_TR, 0, NULL); dp = sp->first; @@ -63,7 +66,8 @@ print_tbl(struct html *h, const struct tbl_span *sp) } tt = print_otag(h, TAG_TD, 0, NULL); if (dp) { - print_text(h, dp->string); + if (dp->string) + print_text(h, dp->string); dp = dp->next; } print_tagq(h, tt);