summaryrefslogtreecommitdiffstats
path: root/man_term.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 /man_term.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 'man_term.c')
-rw-r--r--man_term.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/man_term.c b/man_term.c
index 94160cde..8ca5d312 100644
--- a/man_term.c
+++ b/man_term.c
@@ -181,7 +181,7 @@ a2height(const struct termp *p, const char *cp)
struct roffsu su;
if ( ! a2roffsu(cp, &su, SCALE_VS))
- SCALE_VS_INIT(&su, term_strlen(p, cp));
+ SCALE_VS_INIT(&su, atoi(cp));
return(term_vspan(p, &su));
}
@@ -411,6 +411,13 @@ pre_sp(DECL_ARGS)
{
size_t i, len;
+ if ((NULL == n->prev && n->parent)) {
+ if (MAN_SS == n->parent->tok)
+ return(0);
+ if (MAN_SH == n->parent->tok)
+ return(0);
+ }
+
switch (n->tok) {
case (MAN_br):
len = 0;