summaryrefslogtreecommitdiffstats
path: root/mdoc_validate.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdoc_validate.c')
-rw-r--r--mdoc_validate.c20
1 files changed, 16 insertions, 4 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c
index 261a3030..b8c4c0f8 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -733,14 +733,14 @@ pre_bl(PRE_ARGS)
/*
* Validate the width field. Some list types don't need width
* types and should be warned about them. Others should have it
- * and must also be warned.
+ * and must also be warned. Yet others have a default and need
+ * no warning.
*/
switch (n->norm->Bl.type) {
case (LIST_tag):
- if (n->norm->Bl.width)
- break;
- mdoc_nmsg(mdoc, n, MANDOCERR_NOWIDTHARG);
+ if (NULL == n->norm->Bl.width)
+ mdoc_nmsg(mdoc, n, MANDOCERR_NOWIDTHARG);
break;
case (LIST_column):
/* FALLTHROUGH */
@@ -754,6 +754,18 @@ pre_bl(PRE_ARGS)
if (n->norm->Bl.width)
mdoc_nmsg(mdoc, n, MANDOCERR_IGNARGV);
break;
+ case (LIST_bullet):
+ /* FALLTHROUGH */
+ case (LIST_dash):
+ /* FALLTHROUGH */
+ case (LIST_hyphen):
+ if (NULL == n->norm->Bl.width)
+ n->norm->Bl.width = "2n";
+ break;
+ case (LIST_enum):
+ if (NULL == n->norm->Bl.width)
+ n->norm->Bl.width = "3n";
+ break;
default:
break;
}