=================================================================== RCS file: /cvs/mandoc/mdoc_html.c,v retrieving revision 1.215 retrieving revision 1.218 diff -u -p -r1.215 -r1.218 --- mandoc/mdoc_html.c 2014/12/01 08:05:52 1.215 +++ mandoc/mdoc_html.c 2014/12/23 13:48:57 1.218 @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.215 2014/12/01 08:05:52 schwarze Exp $ */ +/* $Id: mdoc_html.c,v 1.218 2014/12/23 13:48:57 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons * Copyright (c) 2014 Ingo Schwarze @@ -279,10 +279,11 @@ static void a2width(const char *p, struct roffsu *su) { - if ( ! a2roffsu(p, su, SCALE_MAX)) { + if (a2roffsu(p, su, SCALE_MAX) < 2) { su->unit = SCALE_EN; su->scale = html_strlen(p); - } + } else if (su->scale < 0.0) + su->scale = 0.0; } /* @@ -1201,7 +1202,8 @@ mdoc_bd_pre(MDOC_ARGS) default: break; } - if (nn->next && nn->next->line == nn->line) + if (h->flags & HTML_NONEWLINE || + (nn->next && ! (nn->next->flags & MDOC_LINE))) continue; else if (nn->next) print_text(h, "\n"); @@ -1565,9 +1567,12 @@ mdoc_sp_pre(MDOC_ARGS) SCALE_VS_INIT(&su, 1); if (MDOC_sp == n->tok) { - if (NULL != (n = n->child)) + if (NULL != (n = n->child)) { if ( ! a2roffsu(n->string, &su, SCALE_VS)) - SCALE_VS_INIT(&su, atoi(n->string)); + su.scale = 1.0; + else if (su.scale < 0.0) + su.scale = 0.0; + } } else su.scale = 0.0;