diff --git a/src/parser.c b/src/parser.c index 6796b9c..c942bd7 100644 --- a/src/parser.c +++ b/src/parser.c @@ -1352,7 +1352,10 @@ void TY_(ParseBlock)( TidyDocImpl* doc, Node *element, GetTokenMode mode) continue; } - TY_(UngetToken)( doc ); + if (nodeIsA(element)) + { + TY_(UngetToken)( doc ); + } TY_(ReportError)(doc, element, node, MISSING_ENDTAG_BEFORE); if (!(mode & Preformatted))