- case 'caption':
- $this->afe->insertMarker();
- $this->stack->insertHTMLElement( $value, $attribs );
- $this->switchMode( 'inCaptionMode' );
- return true;
- case 'colgroup':
- $this->stack->clearToContext( BalanceSets::$tableContextSet );
- $this->stack->insertHTMLElement( $value, $attribs );
- $this->switchMode( 'inColumnGroupMode' );
- return true;
- case 'col':
- $this->inTableMode( 'tag', 'colgroup', [] );
- return $this->insertToken( $token, $value, $attribs, $selfClose );
- case 'tbody':
- case 'tfoot':
- case 'thead':
- $this->stack->clearToContext( BalanceSets::$tableContextSet );
- $this->stack->insertHTMLElement( $value, $attribs );
- $this->switchMode( 'inTableBodyMode' );
- return true;
- case 'td':
- case 'th':
- case 'tr':
- $this->inTableMode( 'tag', 'tbody', [] );
- return $this->insertToken( $token, $value, $attribs, $selfClose );
- case 'table':
- if ( !$this->stack->inTableScope( $value ) ) {
- return true; // Ignore this tag.
- }
- $this->inTableMode( 'endtag', $value );
- return $this->insertToken( $token, $value, $attribs, $selfClose );
-
- case 'style':
- // OMITTED: <script>
- case 'template':
- return $this->inHeadMode( $token, $value, $attribs, $selfClose );
+ case 'caption':
+ $this->afe->insertMarker();
+ $this->stack->insertHTMLElement( $value, $attribs );
+ $this->switchMode( 'inCaptionMode' );
+ return true;
+ case 'colgroup':
+ $this->stack->clearToContext( BalanceSets::$tableContextSet );
+ $this->stack->insertHTMLElement( $value, $attribs );
+ $this->switchMode( 'inColumnGroupMode' );
+ return true;
+ case 'col':
+ $this->inTableMode( 'tag', 'colgroup', [] );
+ return $this->insertToken( $token, $value, $attribs, $selfClose );
+ case 'tbody':
+ case 'tfoot':
+ case 'thead':
+ $this->stack->clearToContext( BalanceSets::$tableContextSet );
+ $this->stack->insertHTMLElement( $value, $attribs );
+ $this->switchMode( 'inTableBodyMode' );
+ return true;
+ case 'td':
+ case 'th':
+ case 'tr':
+ $this->inTableMode( 'tag', 'tbody', [] );
+ return $this->insertToken( $token, $value, $attribs, $selfClose );
+ case 'table':
+ if ( !$this->stack->inTableScope( $value ) ) {
+ return true; // Ignore this tag.
+ }
+ $this->inTableMode( 'endtag', $value );
+ return $this->insertToken( $token, $value, $attribs, $selfClose );