Skip to content

Commit fbded05

Browse files
committed
Remove outdated fragment preambles from tree output
When fragments were used instead of full processors, some fake tree structure had to be prepended to the output. This is no longer necessary and breaks the fragment cases.
1 parent 274914e commit fbded05

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/phpunit/tests/html-api/wpHtmlProcessorHtml5lib.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ private static function build_tree_representation( ?string $fragment_context, st
232232
* and requires adjustment to initial parameters.
233233
* The full parser will not.
234234
*/
235-
$output = $fragment_context ? "<html>\n <head>\n <body>\n" : '';
236-
$indent_level = $fragment_context ? 2 : 0;
235+
$output = '';
236+
$indent_level = 0;
237237
$indent = ' ';
238238
$was_text = null;
239239
$text_node = '';

0 commit comments

Comments
 (0)