diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-07-29 09:02:41 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2009-07-29 09:02:41 +0000 |
commit | faaeea1889fc927868c7e029c3f617fd5f5678b0 (patch) | |
tree | c317d0ea7a4300369694b8f0efc226885f6dbe2a /mdoc_term.c | |
parent | 5276499ee929328cefca10a21cb87795842b89fd (diff) | |
download | mandoc-faaeea1889fc927868c7e029c3f617fd5f5678b0.tar.gz |
Fixed groff-compat where two `Sh' calls, with the first not having a body, don't assert vspace between calls.
Diffstat (limited to 'mdoc_term.c')
-rw-r--r-- | mdoc_term.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/mdoc_term.c b/mdoc_term.c index 28822fac..ed9e0e01 100644 --- a/mdoc_term.c +++ b/mdoc_term.c @@ -1399,12 +1399,17 @@ static int termp_sh_pre(DECL_ARGS) { /* - * FIXME: using two `Sh' macros in sequence has no vspace - * between calls, only a newline. + * XXX: undocumented: using two `Sh' macros in sequence has no + * vspace between calls, only a newline. */ switch (node->type) { - case (MDOC_HEAD): + case (MDOC_BLOCK): + if (node->prev && MDOC_Sh == node->prev->tok) + if (NULL == node->prev->body->child) + break; term_vspace(p); + break; + case (MDOC_HEAD): pair->flag |= ttypes[TTYPE_SECTION]; break; case (MDOC_BODY): |