diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-07-19 11:06:31 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-07-19 11:06:31 +0000 |
commit | 85c2f67c61711f4fee63b14506a8f074796e5644 (patch) | |
tree | b873cf288687b59d9fa01cb7e96afef575a447b6 | |
parent | 1507d1e29763a8c5c8133abfc572ae97eb6dd72d (diff) | |
download | mandoc-85c2f67c61711f4fee63b14506a8f074796e5644.tar.gz |
Fix spurrious newline emitted by `Pp' when specified before or after
`Sh'/`Ss'. Reported by Jason McIntyre.
-rw-r--r-- | TODO | 3 | ||||
-rw-r--r-- | mdoc_html.c | 5 | ||||
-rw-r--r-- | mdoc_term.c | 5 |
3 files changed, 10 insertions, 3 deletions
@@ -74,9 +74,6 @@ try e.g. .Bl -column It Ta Ta reported by millert Fri, 02 Apr 2010 16:13:46 -0400 -- .Pp before and after .Sh (and .Ss) produces a spurious blank line; - reported by jmc@ Thu, 15 Jul 2010 23:00:28 +0100 - ************************************************************************ * formatting issues: gratuitious differences ************************************************************************ diff --git a/mdoc_html.c b/mdoc_html.c index cb917b4e..359698aa 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -1737,6 +1737,11 @@ mdoc_sp_pre(MDOC_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; } 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; } |