summaryrefslogtreecommitdiffstats
path: root/mdoc_term.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-07-19 11:06:31 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-07-19 11:06:31 +0000
commit85c2f67c61711f4fee63b14506a8f074796e5644 (patch)
treeb873cf288687b59d9fa01cb7e96afef575a447b6 /mdoc_term.c
parent1507d1e29763a8c5c8133abfc572ae97eb6dd72d (diff)
downloadmandoc-85c2f67c61711f4fee63b14506a8f074796e5644.tar.gz
Fix spurrious newline emitted by `Pp' when specified before or after
`Sh'/`Ss'. Reported by Jason McIntyre.
Diffstat (limited to 'mdoc_term.c')
-rw-r--r--mdoc_term.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 117ac1e1..6e280b3f 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1905,6 +1905,11 @@ termp_sp_pre(DECL_ARGS)
len = 0;
break;
default:
+ assert(n->parent);
+ if ((NULL == n->next || NULL == n->prev) &&
+ (MDOC_Ss == n->parent->tok ||
+ MDOC_Sh == n->parent->tok))
+ return(0);
len = 1;
break;
}