- Timestamp:
- 07/30/2024 06:44:45 PM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/tests/phpunit/tests/html-api/wpHtmlProcessorHtml5lib.php
r58779 r58833 35 35 'adoption01/line0159' => 'Unimplemented: Reconstruction of active formatting elements.', 36 36 'adoption01/line0318' => 'Unimplemented: Reconstruction of active formatting elements.', 37 'template/line0885' => 'Unimplemented: no parsing of attributes on context node.', 37 38 'tests1/line0720' => 'Unimplemented: Reconstruction of active formatting elements.', 38 39 'tests15/line0001' => 'Unimplemented: Reconstruction of active formatting elements.', … … 164 165 } 165 166 166 if ( $was_text && '#text' !== $processor->get_token_name() ) { 167 $token_name = $processor->get_token_name(); 168 $token_type = $processor->get_token_type(); 169 $is_closer = $processor->is_tag_closer(); 170 171 if ( $was_text && '#text' !== $token_name ) { 167 172 $output .= "{$text_node}\"\n"; 168 173 $was_text = false; … … 170 175 } 171 176 172 switch ( $ processor->get_token_type()) {177 switch ( $token_type ) { 173 178 case '#tag': 174 $tag_name = strtolower( $ processor->get_tag());175 176 if ( $ processor->is_tag_closer()) {179 $tag_name = strtolower( $token_name ); 180 181 if ( $is_closer ) { 177 182 --$indent_level; 183 184 if ( 'TEMPLATE' === $token_name ) { 185 --$indent_level; 186 } 187 178 188 break; 179 189 } 180 190 181 $tag_indent = count( $processor->get_breadcrumbs() ) - 1;191 $tag_indent = $indent_level; 182 192 183 193 if ( ! WP_HTML_Processor::is_void( $tag_name ) ) { 184 $indent_level = $tag_indent + 1;194 ++$indent_level; 185 195 } 186 196 … … 208 218 if ( '' !== $modifiable_text ) { 209 219 $output .= str_repeat( $indent, $indent_level ) . "\"{$modifiable_text}\"\n"; 220 } 221 222 if ( 'TEMPLATE' === $token_name ) { 223 $output .= str_repeat( $indent, $indent_level ) . "content\n"; 224 ++$indent_level; 210 225 } 211 226
Note: See TracChangeset
for help on using the changeset viewer.