aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/mdoc_html.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2014-12-23 09:31:46 +0000
committerIngo Schwarze <schwarze@openbsd.org>2014-12-23 09:31:46 +0000
commitb746353a05b8aa9d139a3058dfc846eb7c978997 (patch)
tree148663f150cd664bbc197e0cecd0dbb1c442a185 /mdoc_html.c
parent5d42210e3b9f8220e4026cbeb581e5953e7bd23d (diff)
downloadmandoc-b746353a05b8aa9d139a3058dfc846eb7c978997.tar.gz
mandoc-b746353a05b8aa9d139a3058dfc846eb7c978997.tar.zst
mandoc-b746353a05b8aa9d139a3058dfc846eb7c978997.zip
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.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index ca51049e..efdd78f4 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.216 2014/12/02 10:08:06 schwarze Exp $ */
+/* $Id: mdoc_html.c,v 1.217 2014/12/23 09:31:46 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -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;