Skip to content

Commit 449ae5a

Browse files
committed
Remove the symmetric helper $bookmark_start since it's not necessary
1 parent 045b5c0 commit 449ae5a

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1651,7 +1651,6 @@ private function apply_attributes_updates( $shift_this_point = 0 ) {
16511651
* replacements adjust offsets in the input document.
16521652
*/
16531653
foreach ( $this->bookmarks as $bookmark_name => $bookmark ) {
1654-
$bookmark_start = $bookmark->start;
16551654
$bookmark_end = $bookmark_start + $bookmark->length;
16561655

16571656
/*
@@ -1666,18 +1665,18 @@ private function apply_attributes_updates( $shift_this_point = 0 ) {
16661665
foreach ( $this->lexical_updates as $diff ) {
16671666
$diff_end = $diff->start + $diff->length;
16681667

1669-
if ( $bookmark_start < $diff->start && $bookmark_end < $diff->start ) {
1668+
if ( $bookmark->start < $diff->start && $bookmark_end < $diff->start ) {
16701669
break;
16711670
}
16721671

1673-
if ( $bookmark_start >= $diff->start && $bookmark_end < $diff_end ) {
1672+
if ( $bookmark->start >= $diff->start && $bookmark_end < $diff_end ) {
16741673
$this->release_bookmark( $bookmark_name );
16751674
continue 2;
16761675
}
16771676

16781677
$delta = strlen( $diff->text ) - $diff->length;
16791678

1680-
if ( $bookmark_start >= $diff->start ) {
1679+
if ( $bookmark->start >= $diff->start ) {
16811680
$head_delta += $delta;
16821681
}
16831682

0 commit comments

Comments
 (0)