diff options
author | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-04-03 14:02:10 +0000 |
---|---|---|
committer | Kristaps Dzonsons <kristaps@bsd.lv> | 2010-04-03 14:02:10 +0000 |
commit | e2afc6f7327836c862d47783571b5f518d1bb517 (patch) | |
tree | 762ba6eca1ca365d77753d75c94391275b6595ba /mdoc_validate.c | |
parent | d9b4ef04d59b4dfd661c39eee2c8bb5faafc55cf (diff) | |
download | mandoc-e2afc6f7327836c862d47783571b5f518d1bb517.tar.gz |
Merged Ingo Schwarze's patch (plus documentation) for removing extraneous list types, which happens fairly often.
Diffstat (limited to 'mdoc_validate.c')
-rw-r--r-- | mdoc_validate.c | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/mdoc_validate.c b/mdoc_validate.c index e67286a5..af5d5ad1 100644 --- a/mdoc_validate.c +++ b/mdoc_validate.c @@ -621,8 +621,19 @@ pre_bl(PRE_ARGS) case (MDOC_Inset): /* FALLTHROUGH */ case (MDOC_Column): - if (type >= 0) - return(mdoc_nerr(mdoc, n, EMULTILIST)); + /* + * Note that if a duplicate is detected, we + * remove the duplicate instead of passing it + * over. If we don't do this, mdoc_action will + * become confused when it scans over multiple + * types whilst setting its bitmasks. + */ + if (type >= 0) { + if ( ! mdoc_nwarn(mdoc, n, EMULTILIST)) + return(0); + mdoc_argn_free(n->args, pos); + break; + } type = n->args->argv[pos].arg; break; case (MDOC_Compact): |