Skip to content

Commit 9c0dbc5

Browse files
committed
Issue #314 - avoid warning when show body only
1 parent 98ad2bc commit 9c0dbc5

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/parser.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3639,8 +3639,9 @@ void TY_(ParseHead)(TidyDocImpl* doc, Node *head, GetTokenMode ARG_UNUSED(mode))
36393639
{
36403640
/*\ Issue #132 - avoid warning for missing body tag,
36413641
* if configured to --omit-otpional-tags yes
3642+
* Issue #314 - and if --show-body-only
36423643
\*/
3643-
if (!cfgBool( doc, TidyOmitOptionalTags )) {
3644+
if (!cfgBool( doc, TidyOmitOptionalTags ) && !showingBodyOnly(doc) ) {
36443645
TY_(ReportError)(doc, head, node, TAG_NOT_ALLOWED_IN);
36453646
}
36463647
TY_(UngetToken)( doc );

0 commit comments

Comments
 (0)