diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-01-01 15:14:03 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-01-01 15:14:03 +0000 |
commit | 613f031b2e157db30a9d9b5649a9d8ac75faa7e5 (patch) | |
tree | 3ed9c90c264fb3d6bb68d8fa890146bf0bae5478 | |
parent | d9e083236177b894e7e46495fc3b88cb10ee909a (diff) | |
download | mandoc-613f031b2e157db30a9d9b5649a9d8ac75faa7e5.tar.gz mandoc-613f031b2e157db30a9d9b5649a9d8ac75faa7e5.tar.zst mandoc-613f031b2e157db30a9d9b5649a9d8ac75faa7e5.zip |
`Bl' lets `Sm' slip by as a child. Noted by Ingo Schwarze.
-rw-r--r-- | mdoc_validate.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c index 91d9f032..b6ee5c62 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.54 2009/11/02 06:22:46 kristaps Exp $ */ +/* $Id: mdoc_validate.c,v 1.55 2010/01/01 15:14:03 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@kth.se> * @@ -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)); } |