From 541b4f690e4f10d6e519b6d3059be5c15ec586c1 Mon Sep 17 00:00:00 2001 From: Jon Surrell Date: Fri, 25 Oct 2024 23:19:19 +0200 Subject: [PATCH] wip --- src/wp-includes/html-api/class-wp-html-processor.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/wp-includes/html-api/class-wp-html-processor.php b/src/wp-includes/html-api/class-wp-html-processor.php index 7d3a3d56329bd..46bac0abc68f3 100644 --- a/src/wp-includes/html-api/class-wp-html-processor.php +++ b/src/wp-includes/html-api/class-wp-html-processor.php @@ -5343,6 +5343,7 @@ public function seek( $bookmark_name ): bool { */ $this->state->stack_of_open_elements = new WP_HTML_Open_Elements(); $this->state->active_formatting_elements = new WP_HTML_Active_Formatting_Elements(); + $this->state->insertion_mode = WP_HTML_Processor_State::INSERTION_MODE_INITIAL; $this->breadcrumbs = array(); $this->bytes_already_parsed = 0; @@ -5381,7 +5382,7 @@ public function seek( $bookmark_name ): bool { return true; } - while ( $this->next_token() ) { + while ( var_dump( $this->next_token() ) ) { echo 'bm starts at ' . $bookmark_starts_at . ' and current token starts at ' . $this->bookmarks[ $this->state->current_token->bookmark_name ]->start . "\n"; if ( $bookmark_starts_at === $this->bookmarks[ $this->state->current_token->bookmark_name ]->start ) { while ( isset( $this->current_element ) && WP_HTML_Stack_Event::POP === $this->current_element->operation ) {