summaryrefslogtreecommitdiffstatshomepage
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
commitdeac31b6127bb1d48e15d19023fa8bfba1ebe3d7 (patch)
treea0dc5f7bd506620850b5f395b624bc2b864c16ce
parent14d6092cc2ae762d281d54eca9b4b8bd8457bdc8 (diff)
downloadmandoc-deac31b6127bb1d48e15d19023fa8bfba1ebe3d7.tar.gz
mandoc-deac31b6127bb1d48e15d19023fa8bfba1ebe3d7.tar.zst
mandoc-deac31b6127bb1d48e15d19023fa8bfba1ebe3d7.zip
Fixed undocumented `-diag' where NULL list item bodies aren't followed by a vspace.
-rw-r--r--mdoc_term.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 5ad5de67..4f8d776b 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_term.c,v 1.54 2009/07/21 15:03:37 kristaps Exp $ */
+/* $Id: mdoc_term.c,v 1.55 2009/07/21 15:35:30 kristaps Exp $ */
/*
* Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se>
*
@@ -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);
}