File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -405,11 +405,7 @@ export class Parser implements Callbacks {
405405
406406 if ( impliesClose ) {
407407 while ( this . stack . length > 0 && impliesClose . has ( this . stack [ 0 ] ) ) {
408- const element = this . stack . shift ( ) ;
409- if ( element === undefined ) {
410- break ;
411- }
412- this . cbs . onclosetag ?.( element , true ) ;
408+ this . popElement ( true ) ;
413409 }
414410 }
415411 if ( ! this . isVoidElement ( name ) ) {
@@ -705,6 +701,7 @@ export class Parser implements Callbacks {
705701 this . tokenizer . reset ( ) ;
706702 this . tagname = "" ;
707703 this . attribname = "" ;
704+ this . attribvalue = "" ;
708705 this . attribs = null ;
709706 this . stack . length = 0 ;
710707 this . startIndex = 0 ;
Original file line number Diff line number Diff line change @@ -207,7 +207,7 @@ export default class Tokenizer {
207207 {
208208 xmlMode = false ,
209209 decodeEntities = true ,
210- recognizeSelfClosing = false ,
210+ recognizeSelfClosing = xmlMode ,
211211 } : {
212212 xmlMode ?: boolean ;
213213 decodeEntities ?: boolean ;
@@ -513,7 +513,7 @@ export default class Tokenizer {
513513 this . startEntity ( ) ;
514514 }
515515 } else if ( this . fastForwardTo ( CharCodes . Lt ) ) {
516- // Outside of <title> tags, we can fast-forward.
516+ // Outside of RCDATA tags, we can fast-forward.
517517 this . sequenceIndex = 1 ;
518518 }
519519 } else {
@@ -627,7 +627,7 @@ export default class Tokenizer {
627627 this . cbs . onselfclosingtag ( this . index ) ;
628628 this . sectionStart = this . index + 1 ;
629629
630- if ( ! ( this . xmlMode || this . recognizeSelfClosing ) ) {
630+ if ( ! this . recognizeSelfClosing ) {
631631 this . enterTagBody ( ) ;
632632 return ;
633633 }
You can’t perform that action at this time.
0 commit comments