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

View file

@ -3367,7 +3367,12 @@ void TY_(ParseHead)(TidyDocImpl* doc, Node *head, GetTokenMode ARG_UNUSED(mode))
if (TY_(nodeIsText)(node)) 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 ); TY_(UngetToken)( doc );
break; break;
} }