File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
src/nu/validator/htmlparser/impl Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -1800,9 +1800,10 @@ public final void startTag(ElementName elementName,
18001800 case TBODY_OR_THEAD_OR_TFOOT :
18011801 case TR :
18021802 case TD_OR_TH :
1803- errStrayStartTag (name );
18041803 eltPos = findLastInTableScope ("caption" );
18051804 if (eltPos == TreeBuilder .NOT_FOUND_ON_STACK ) {
1805+ assert fragment || isTemplateContents ();
1806+ errStrayStartTag (name );
18061807 break starttagloop ;
18071808 }
18081809 generateImpliedEndTags ();
@@ -3275,9 +3276,11 @@ public final void endTag(ElementName elementName) throws SAXException {
32753276 mode = IN_TABLE ;
32763277 break endtagloop ;
32773278 case TABLE :
3278- errTableClosedWhileCaptionOpen ();
32793279 eltPos = findLastInTableScope ("caption" );
3280+
32803281 if (eltPos == TreeBuilder .NOT_FOUND_ON_STACK ) {
3282+ assert fragment || isTemplateContents ();
3283+ errStrayEndTag (name );
32813284 break endtagloop ;
32823285 }
32833286 generateImpliedEndTags ();
@@ -6433,10 +6436,6 @@ private void errHtmlStartTagInForeignContext(@Local String name)
64336436 + "\u201D in a foreign namespace context." );
64346437 }
64356438
6436- private void errTableClosedWhileCaptionOpen () throws SAXException {
6437- err ("\u201C table\u201D closed but \u201C caption\u201D was still open." );
6438- }
6439-
64406439 private void errNoTableRowToClose () throws SAXException {
64416440 err ("No table row to close." );
64426441 }
You can’t perform that action at this time.
0 commit comments