Issue #314 - Avoid head warning if show-body-only

This commit is contained in:
Geoff McLane 2016-02-29 18:49:15 +01:00
parent b41318724c
commit 24c62cf0df

View file

@ -3639,8 +3639,11 @@ void TY_(ParseHead)(TidyDocImpl* doc, Node *head, GetTokenMode ARG_UNUSED(mode))
{
/*\ Issue #132 - avoid warning for missing body tag,
* if configured to --omit-otpional-tags yes
* Issue #314 - and if --show-body-only
\*/
if (!cfgBool( doc, TidyOmitOptionalTags )) {
if (!cfgBool( doc, TidyOmitOptionalTags ) &&
!showingBodyOnly(doc) )
{
TY_(ReportError)(doc, head, node, TAG_NOT_ALLOWED_IN);
}
TY_(UngetToken)( doc );