diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2010-01-01 22:20:25 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2010-01-01 22:20:25 +0000 |
commit | 50afdab30662ed26351f585b9be6f8037a806077 (patch) | |
tree | e3ee23a6a66499d7add0d6039acc52d4ffac8d05 | |
parent | 293c8a22ee1a28a88ec45a897627cc6e3d5b6e77 (diff) |
.Bl may have .Sm as a child.
The comment in the source code and OK by kristaps@;
merged upstream in rev. 1.55.
-rw-r--r-- | usr.bin/mandoc/mdoc_validate.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/usr.bin/mandoc/mdoc_validate.c b/usr.bin/mandoc/mdoc_validate.c index d6919edc2d1..2f87c6424a6 100644 --- a/usr.bin/mandoc/mdoc_validate.c +++ b/usr.bin/mandoc/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.40 2009/12/23 22:30:17 schwarze Exp $ */ +/* $Id: mdoc_validate.c,v 1.41 2010/01/01 22:20:24 schwarze Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -1082,11 +1082,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)); } |