diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-12-23 13:48:57 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-12-23 13:48:57 +0000 |
commit | 4ad53635f5202474c55af90f70bba0ade18962cb (patch) | |
tree | ec073e4714b3d859a66a94147789aa077e78dd38 /mdoc_html.c | |
parent | f2c1420553b275dd2f792b3a15c8fb0437f58052 (diff) | |
download | mandoc-4ad53635f5202474c55af90f70bba0ade18962cb.tar.gz |
support negative horizontal widths in man(7);
minus twenty lines of code in spite of enhanced functionality
Diffstat (limited to 'mdoc_html.c')
-rw-r--r-- | mdoc_html.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/mdoc_html.c b/mdoc_html.c index 402ee1ad..885565e3 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -282,7 +282,8 @@ a2width(const char *p, struct roffsu *su) 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; } /* @@ -1566,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)) su.scale = 1.0; + else if (su.scale < 0.0) + su.scale = 0.0; + } } else su.scale = 0.0; |