diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-12-23 09:31:46 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-12-23 09:31:46 +0000 |
commit | 83592bae7b4cc86364128d1a37075c8d2ab3f14f (patch) | |
tree | 0c4bbf3561d1fd7d3645e88846d2a774680001dc /mdoc_html.c | |
parent | ce8ab0a1bb72b1a1bf7fbc11edfcad682e7d1619 (diff) | |
download | mandoc-83592bae7b4cc86364128d1a37075c8d2ab3f14f.tar.gz |
some scaling unit fixes:
- .sp with an invalid argument is .sp 1v, not .sp 0v
- in man(1), trailing garbage doesn't make scaling units invalid
Diffstat (limited to 'mdoc_html.c')
-rw-r--r-- | mdoc_html.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mdoc_html.c b/mdoc_html.c index 305ad499..402ee1ad 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -279,7 +279,7 @@ 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); } @@ -1568,7 +1568,7 @@ mdoc_sp_pre(MDOC_ARGS) if (MDOC_sp == n->tok) { if (NULL != (n = n->child)) if ( ! a2roffsu(n->string, &su, SCALE_VS)) - SCALE_VS_INIT(&su, atoi(n->string)); + su.scale = 1.0; } else su.scale = 0.0; |