Skip to content

Commit

Permalink
HTML API: Pull updates from development in Core
Browse files Browse the repository at this point in the history
This commit pulls in updates from development of the HTML API happening in Core.

 - HTML API: Fix finding bookmarks set on closing tag WP_HTML_Tag_Processor
   83ae6b790e5f1d361b5b128063f74bf253b55397

 - HTML API: Set $this->html to protected to support subclassing
   552178a95ad38c924f9d9821d3c75d0bf9926748
  • Loading branch information
dmsnell committed Feb 24, 2023
1 parent bf2efa5 commit c846c62
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ class Gutenberg_HTML_Tag_Processor_6_3 {
* @since 6.2.0
* @var string
*/
private $html;
protected $html;

/**
* The last query passed to next_tag().
Expand Down Expand Up @@ -722,7 +722,7 @@ public function set_bookmark( $name ) {
}

$this->bookmarks[ $name ] = new WP_HTML_Span(
$this->tag_name_starts_at - 1,
$this->tag_name_starts_at - ( $this->is_closing_tag ? 2 : 1 ),
$this->tag_ends_at
);

Expand Down Expand Up @@ -1519,7 +1519,7 @@ public function seek( $bookmark_name ) {
$this->bytes_already_parsed = $this->bookmarks[ $bookmark_name ]->start;
$this->bytes_already_copied = $this->bytes_already_parsed;
$this->output_buffer = substr( $this->html, 0, $this->bytes_already_copied );
return $this->next_tag();
return $this->next_tag( array( 'tag_closers' => 'visit' ) );
}

/**
Expand Down

1 comment on commit c846c62

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in c846c62.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4267181671
📝 Reported issues:

Please sign in to comment.