=================================================================== RCS file: /cvs/mandoc/mdoc_html.c,v retrieving revision 1.153 retrieving revision 1.155 diff -u -p -r1.153 -r1.155 --- mandoc/mdoc_html.c 2011/02/09 09:52:47 1.153 +++ mandoc/mdoc_html.c 2011/03/22 14:05:45 1.155 @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.153 2011/02/09 09:52:47 kristaps Exp $ */ +/* $Id: mdoc_html.c,v 1.155 2011/03/22 14:05:45 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * @@ -431,7 +431,11 @@ print_mdoc_node(MDOC_ARGS) if (' ' == *n->string && MDOC_LINE & n->flags) if ( ! (HTML_LITERAL & h->flags)) print_otag(h, TAG_BR, 0, NULL); + if (MDOC_DELIMC & n->flags) + h->flags |= HTML_NOSPACE; print_text(h, n->string); + if (MDOC_DELIMO & n->flags) + h->flags |= HTML_NOSPACE; return; case (MDOC_EQN): PAIR_CLASS_INIT(&tag, "eqn"); @@ -500,10 +504,7 @@ mdoc_root_post(MDOC_ARGS) { struct htmlpair tag[3]; struct tag *t, *tt; - char b[DATESIZ]; - time2a(m->date, b, DATESIZ); - PAIR_SUMMARY_INIT(&tag[0], "Document Footer"); PAIR_CLASS_INIT(&tag[1], "foot"); if (NULL == h->style) { @@ -522,7 +523,7 @@ mdoc_root_post(MDOC_ARGS) PAIR_CLASS_INIT(&tag[0], "foot-date"); print_otag(h, TAG_TD, 1, tag); - print_text(h, b); + print_text(h, m->date); print_stagq(h, tt); PAIR_CLASS_INIT(&tag[0], "foot-os"); @@ -1384,12 +1385,16 @@ mdoc_fa_pre(MDOC_ARGS) t = print_otag(h, TAG_I, 1, &tag); print_text(h, nn->string); print_tagq(h, t); - if (nn->next) + if (nn->next) { + h->flags |= HTML_NOSPACE; print_text(h, ","); + } } - if (n->child && n->next && n->next->tok == MDOC_Fa) + if (n->child && n->next && n->next->tok == MDOC_Fa) { + h->flags |= HTML_NOSPACE; print_text(h, ","); + } return(0); } @@ -1517,13 +1522,19 @@ mdoc_fn_pre(MDOC_ARGS) t = print_otag(h, TAG_I, i, tag); print_text(h, nn->string); print_tagq(h, t); - if (nn->next) + if (nn->next) { + h->flags |= HTML_NOSPACE; print_text(h, ","); + } } + h->flags |= HTML_NOSPACE; print_text(h, ")"); - if (MDOC_SYNPRETTY & n->flags) + + if (MDOC_SYNPRETTY & n->flags) { + h->flags |= HTML_NOSPACE; print_text(h, ";"); + } return(0); } @@ -1674,7 +1685,9 @@ mdoc_fo_post(MDOC_ARGS) if (MDOC_BODY != n->type) return; + h->flags |= HTML_NOSPACE; print_text(h, ")"); + h->flags |= HTML_NOSPACE; print_text(h, ";"); } @@ -2035,6 +2048,7 @@ mdoc__x_post(MDOC_ARGS) if (NULL == n->parent || MDOC_Rs != n->parent->tok) return; + h->flags |= HTML_NOSPACE; print_text(h, n->next ? "," : "."); }