File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -5355,7 +5355,10 @@ public function seek( $bookmark_name ): bool {
53555355 $ this ->current_element = null ;
53565356 $ this ->element_queue = array ();
53575357
5358- // The presence or absence of a context node indicates a full or fragment parser.
5358+ /*
5359+ * The absence of a context node indicates a full parse.
5360+ * The presence of a context node indicates a fragment parser.
5361+ */
53595362 if ( null === $ this ->context_node ) {
53605363 $ this ->change_parsing_namespace ( 'html ' );
53615364 $ this ->state ->insertion_mode = WP_HTML_Processor_State::INSERTION_MODE_INITIAL ;
@@ -5387,6 +5390,10 @@ public function seek( $bookmark_name ): bool {
53875390 * a token than may match the bookmarked location.
53885391 */
53895392 do {
5393+ /*
5394+ * The processor will stop on virtual tokens, but bookmarks may not be set on them.
5395+ * They should not be matched when seeking a bookmark, skip them.
5396+ */
53905397 if ( $ this ->is_virtual () ) {
53915398 continue ;
53925399 }
You can’t perform that action at this time.
0 commit comments