summaryrefslogtreecommitdiffstats
path: root/mdoc_validate.c
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-01-01 15:14:03 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-01-01 15:14:03 +0000
commit5447072295942b0ec781ef69debc82e96708f2f9 (patch)
tree0306e6f593e6db4c6a9c3b9383cf401a42e1acec /mdoc_validate.c
parentb95fe918be7186a6c1b5b7b68384713b28f7abed (diff)
downloadmandoc-5447072295942b0ec781ef69debc82e96708f2f9.tar.gz
`Bl' lets `Sm' slip by as a child. Noted by Ingo Schwarze.
Diffstat (limited to 'mdoc_validate.c')
-rw-r--r--mdoc_validate.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c
index 4a4b834b..5a4a92b3 100644
--- a/mdoc_validate.c
+++ b/mdoc_validate.c
@@ -1086,11 +1086,18 @@ post_bl(POST_ARGS)
if (NULL == mdoc->last->child)
return(1);
+ /*
+ * We only allow certain children of `Bl'. This is usually on
+ * `It', but apparently `Sm' occurs here and there, so we let
+ * that one through, too.
+ */
+
/* LINTED */
for (n = mdoc->last->child; n; n = n->next) {
- if (MDOC_BLOCK == n->type)
- if (MDOC_It == n->tok)
- continue;
+ if (MDOC_BLOCK == n->type && MDOC_It == n->tok)
+ continue;
+ if (MDOC_Sm == n->tok)
+ continue;
return(mdoc_nerr(mdoc, n, EBADCHILD));
}