summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-07-15 16:40:29 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-07-15 16:40:29 +0000
commit61f19ffd9b72db20cc1dc1d55da45459375680f4 (patch)
treeb66dd9aa32245c714df583a05183ab8f8d8632c2
parent5ff5658db9bb7304d80a82c9bac3413375514160 (diff)
downloadmandoc-61f19ffd9b72db20cc1dc1d55da45459375680f4.tar.gz
If -column, -diag, -inset, -item, or -ohang lists have a -width,
don't just talk about ignoring it, actually do ignore it. No change for terminal output, improves HTML output.
-rw-r--r--mdoc_validate.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c
index bd0ae253..d455d4ad 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -700,7 +700,7 @@ post_bl_norm(POST_ARGS)
switch (n->norm->Bl.type) {
case LIST_tag:
- if (NULL == n->norm->Bl.width)
+ if (n->norm->Bl.width == NULL)
mandoc_msg(MANDOCERR_BL_NOWIDTH, mdoc->parse,
n->line, n->pos, "Bl -tag");
break;
@@ -709,19 +709,20 @@ post_bl_norm(POST_ARGS)
case LIST_ohang:
case LIST_inset:
case LIST_item:
- if (n->norm->Bl.width)
+ if (n->norm->Bl.width != NULL)
mandoc_vmsg(MANDOCERR_BL_SKIPW, mdoc->parse,
wa->line, wa->pos, "Bl -%s",
mdoc_argnames[mdoclt]);
+ n->norm->Bl.width = NULL;
break;
case LIST_bullet:
case LIST_dash:
case LIST_hyphen:
- if (NULL == n->norm->Bl.width)
+ if (n->norm->Bl.width == NULL)
n->norm->Bl.width = "2n";
break;
case LIST_enum:
- if (NULL == n->norm->Bl.width)
+ if (n->norm->Bl.width == NULL)
n->norm->Bl.width = "3n";
break;
default: