Skip to content

Commit d5bf14c

Browse files
committed
Add and improve comments
1 parent d181938 commit d5bf14c

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

src/wp-includes/html-api/class-wp-html-processor.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)