X-Git-Url: https://git.cameronkatri.com/mandoc.git/blobdiff_plain/a78f7ea60ac3b0e2c941afc20e674fe437317174..e5a4a92d5887db0f1c00568a41c411a1556f8774:/mdoc_validate.c diff --git a/mdoc_validate.c b/mdoc_validate.c index 5d2be450..797642aa 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -1,4 +1,4 @@ -/* $Id: mdoc_validate.c,v 1.36 2009/07/17 12:40:48 kristaps Exp $ */ +/* $Id: mdoc_validate.c,v 1.39 2009/07/23 08:36:32 kristaps Exp $ */ /* * Copyright (c) 2008, 2009 Kristaps Dzonsons * @@ -862,7 +862,7 @@ post_bf(POST_ARGS) return(1); else if (0 == strcmp(p, "Li")) return(1); - else if (0 == strcmp(p, "Sm")) + else if (0 == strcmp(p, "Sy")) return(1); return(mdoc_nerr(mdoc, head, EFONT)); @@ -1028,11 +1028,20 @@ post_it(POST_ARGS) c = mdoc->last->child; for (i = 0; c && MDOC_HEAD == c->type; c = c->next) i++; - if (i == cols) + + if (i < cols || i == (cols + 1)) { + if ( ! mdoc_vwarn(mdoc, mdoc->last->line, + mdoc->last->pos, "column " + "mismatch: have %d, want %d", + i, cols)) + return(0); break; - return(mdoc_verr(mdoc, mdoc->last->line, mdoc->last->pos, - "column mismatch (have %d, want %d)", - i, cols)); + } else if (i == cols) + break; + + return(mdoc_verr(mdoc, mdoc->last->line, + mdoc->last->pos, "column mismatch: " + "have %d, want %d", i, cols)); default: break; }