aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
-rw-r--r--mdoc_term.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 27f065c2..486f1afe 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.288 2014/10/30 20:10:02 schwarze Exp $ */
+/* $Id: mdoc_term.c,v 1.289 2014/11/10 21:56:43 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010, 2012, 2013, 2014 Ingo Schwarze <schwarze@openbsd.org>
@@ -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. */