summaryrefslogtreecommitdiffstats
path: root/mdoc_html.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2011-06-29 15:38:09 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2011-06-29 15:38:09 +0000
commite8ac047d456be99aa702c302ba49dce872afd4fe (patch)
treee7f6b7c8555b193529ca5ccc9947eaa867eeb3f3 /mdoc_html.c
parenta0711566e81ba5fc0028c367fb6c9b3a6e2ba22d (diff)
downloadmandoc-e8ac047d456be99aa702c302ba49dce872afd4fe.tar.gz
First fix how `sp 1' doesn't imply `1v' (it now does) and that 1
followed by non-digits, e.g. `1g', really means `1'. Next, fix some spacing issues where `sp' was invoked in -man after sections or subsections. Make sure this behaviour is mirrored in -Thtml.
Diffstat (limited to 'mdoc_html.c')
-rw-r--r--mdoc_html.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index 62c865cb..d7906a6c 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1633,8 +1633,9 @@ mdoc_sp_pre(MDOC_ARGS)
SCALE_VS_INIT(&su, 1);
if (MDOC_sp == n->tok) {
- if (n->child)
- a2roffsu(n->child->string, &su, SCALE_VS);
+ if (NULL != (n = n->child))
+ if ( ! a2roffsu(n->string, &su, SCALE_VS))
+ SCALE_VS_INIT(&su, atoi(n->string));
} else
su.scale = 0;