File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
packages/happy-dom/src/html-parser Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -148,6 +148,7 @@ export default class HTMLParser {
148
148
private rootDocument : Document | null = null ;
149
149
private nodeStack : Node [ ] = [ ] ;
150
150
private tagNameStack : string [ ] = [ ] ;
151
+ private impliedEndTags : string [ ] = [ ] ;
151
152
private startTagIndex = 0 ;
152
153
private markupRegExp : RegExp | null = null ;
153
154
private readState : MarkupReadStateEnum = MarkupReadStateEnum . data ;
@@ -712,7 +713,14 @@ export default class HTMLParser {
712
713
break ;
713
714
case 'li' :
714
715
this . framesetOk = false ;
716
+ for ( let i = this . nodeStack . length - 1 ; i >= 0 ; i -- ) {
717
+ const node = this . nodeStack [ i ] ;
718
+ if ( node [ PropertySymbol . tagName ] === 'LI' ) {
719
+ this . popTagName ( 'li' ) ;
720
+ }
721
+ }
715
722
this . popTagName ( 'li' ) ;
723
+ if ( )
716
724
}
717
725
break ;
718
726
}
You can’t perform that action at this time.
0 commit comments