Issue #132 - avoid warning if configured to omit-optional-tags.

Difficult decision to avoid head warning.
This commit is contained in:
Geoff McLane 2015-02-01 15:41:52 +01:00
parent 3e0cfbb88d
commit 7a3afd41ca
1 changed files with 6 additions and 1 deletions

View File

@ -3367,7 +3367,12 @@ void TY_(ParseHead)(TidyDocImpl* doc, Node *head, GetTokenMode ARG_UNUSED(mode))
if (TY_(nodeIsText)(node))
{
TY_(ReportError)(doc, head, node, TAG_NOT_ALLOWED_IN);
/*\ Issue #132 - avoid warning for missing body tag,
* if configured to --omit-otpional-tags yes
\*/
if (!cfgBool( doc, TidyOmitOptionalTags )) {
TY_(ReportError)(doc, head, node, TAG_NOT_ALLOWED_IN);
}
TY_(UngetToken)( doc );
break;
}