From 7a3afd41ca410837e463c7191abd2cc7f16e0911 Mon Sep 17 00:00:00 2001 From: Geoff McLane Date: Sun, 1 Feb 2015 15:41:52 +0100 Subject: [PATCH] Issue #132 - avoid warning if configured to omit-optional-tags. Difficult decision to avoid head warning. --- src/parser.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/parser.c b/src/parser.c index 439beeb..51fdf45 100644 --- a/src/parser.c +++ b/src/parser.c @@ -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; }