Skip to content

Commit e7ee841

Browse files
committed
small optimization
1 parent 6401324 commit e7ee841

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/main/java/org/htmlunit/cyberneko/HTMLTagBalancer.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,11 +1178,11 @@ public void endElement(final QName element, final Augmentations augs) throws XNI
11781178
forceStartElement(element, fEmptyXMLAttributes, synthesizedAugs());
11791179
return;
11801180
}
1181-
else if (elementCode == HTMLElements.HTML) {
1182-
fSeenRootElementEnd = true;
1183-
}
11841181
else if (fIgnoreOutsideContent) {
1185-
if (elementCode == HTMLElements.BODY) {
1182+
if (elementCode == HTMLElements.HTML) {
1183+
fSeenRootElementEnd = true;
1184+
}
1185+
else if (elementCode == HTMLElements.BODY) {
11861186
fSeenBodyElementEnd = true;
11871187
}
11881188
else if (fSeenBodyElementEnd) {

0 commit comments

Comments
 (0)