summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mdoc_term.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 78c81b32..c115e0eb 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -572,16 +572,18 @@ print_bvspace(struct termp *p,
/* Do not vspace directly after Ss/Sh. */
- for (nn = n; nn; nn = nn->parent) {
- if (MDOC_BLOCK != nn->type)
- continue;
- if (MDOC_Ss == nn->tok)
- return;
- if (MDOC_Sh == nn->tok)
+ nn = n;
+ while (nn->prev == NULL) {
+ do {
+ nn = nn->parent;
+ if (nn->type == MDOC_ROOT)
+ return;
+ } while (nn->type != MDOC_BLOCK);
+ if (nn->tok == MDOC_Sh || nn->tok == MDOC_Ss)
return;
- if (NULL == nn->prev)
- continue;
- break;
+ if (nn->tok == MDOC_It &&
+ nn->parent->parent->norm->Bl.type != LIST_item)
+ break;
}
/* A `-column' does not assert vspace within the list. */