Skip to content

Commit

Permalink
(html5lib-tests) Write namespace into test output
Browse files Browse the repository at this point in the history
  • Loading branch information
sirreal committed Feb 2, 2024
1 parent ed46c57 commit 5462378
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/phpunit/tests/html-api/wpHtmlProcessorHtml5lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,10 @@ public static function build_html5_treelike_string( $fragment_context, $html ) {
$indent_level = $tag_indent + 1;
}

$output .= str_repeat( $indent, $tag_indent ) . "<{$tag_name}>\n";
$namespace = $processor->get_namespace();
$namespace = $namespace === 'html' ? '' : "{$namespace} ";

$output .= str_repeat( $indent, $tag_indent ) . "<{$namespace}{$tag_name}>\n";

$attribute_names = $processor->get_attribute_names_with_prefix( '' );
if ( $attribute_names ) {
Expand Down

0 comments on commit 5462378

Please sign in to comment.