summaryrefslogtreecommitdiffstats
path: root/mdoc_term.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2009-07-21 15:35:30 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2009-07-21 15:35:30 +0000
commitc57985004ae3ccfbb98caad012fbdd9c2e63d5eb (patch)
tree186b4c6a93537c333b90df1463c0bedb3ea851c9 /mdoc_term.c
parentc767c89c5ea56f842a1294519fecaa43954d70fb (diff)
downloadmandoc-c57985004ae3ccfbb98caad012fbdd9c2e63d5eb.tar.gz
Fixed undocumented `-diag' where NULL list item bodies aren't followed by a vspace.
Diffstat (limited to 'mdoc_term.c')
-rw-r--r--mdoc_term.c15
1 files changed, 13 insertions, 2 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 44297175..2dfc97f1 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -689,14 +689,25 @@ fmt_block_vspace(struct termp *p,
}
/*
- * XXX - not documented: a `-column' does not ever assert
- * vertical space within the list.
+ * XXX - not documented: a `-column' does not ever assert vspace
+ * within the list.
*/
if (arg_hasattr(MDOC_Column, bl))
if (node->prev && MDOC_It == node->prev->tok)
return;
+ /*
+ * XXX - not documented: a `-diag' without a body does not
+ * assert a vspace prior to the next element.
+ */
+ if (arg_hasattr(MDOC_Diag, bl))
+ if (node->prev && MDOC_It == node->prev->tok) {
+ assert(node->prev->body);
+ if (NULL == node->prev->body->child)
+ return;
+ }
+
term_vspace(p);
}