Skip to content

Commit

Permalink
Add tfoot to appropriate fields in IsParentExplicitEnd
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanstreb committed Aug 14, 2024
1 parent 9ead5db commit f208514
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/HtmlAgilityPack.Shared/HtmlDocument.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1956,19 +1956,19 @@ private bool IsParentExplicitEnd()
isExplicitEnd = nodeName == "table";
break;
case "tr":
isExplicitEnd = nodeName == "tr" || nodeName == "tbody";
isExplicitEnd = nodeName == "tr" || nodeName == "thead" || nodeName == "tbody" || nodeName == "tfoot";
break;
case "thead":
isExplicitEnd = nodeName == "tbody";
isExplicitEnd = nodeName == "tbody" || nodeName == "tfoot";
break;
case "tbody":
isExplicitEnd = nodeName == "tbody";
isExplicitEnd = nodeName == "tbody" || nodeName == "tfoot";
break;
case "td":
isExplicitEnd = nodeName == "td" || nodeName == "th" || nodeName == "tr" || nodeName == "tbody";
isExplicitEnd = nodeName == "td" || nodeName == "th" || nodeName == "tr" || nodeName == "tbody" || nodeName == "tfoot";
break;
case "th":
isExplicitEnd = nodeName == "td" || nodeName == "th" || nodeName == "tr" || nodeName == "tbody";
isExplicitEnd = nodeName == "td" || nodeName == "th" || nodeName == "tr" || nodeName == "tbody" || nodeName == "tfoot";
break;
case "h1":
isExplicitEnd = nodeName == "h2" || nodeName == "h3" || nodeName == "h4" || nodeName == "h5";
Expand Down

0 comments on commit f208514

Please sign in to comment.