Changeset 58233
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/html-api/class-wp-html-tag-processor.php
r58040 r58233 927 927 } 928 928 $this->parser_state = self::STATE_MATCHED_TAG; 929 $this->token_length = $tag_ends_at - $this->token_starts_at;930 929 $this->bytes_already_parsed = $tag_ends_at + 1; 930 931 931 932 932 /* … … 1014 1014 $this->token_starts_at = $was_at; 1015 1015 $this->token_length = $this->bytes_already_parsed - $this->token_starts_at; 1016 $this->text_starts_at = $tag_ends_at + 1;1016 $this->text_starts_at = $tag_ends_at; 1017 1017 $this->text_length = $this->tag_name_starts_at - $this->text_starts_at; 1018 1018 $this->tag_name_starts_at = $tag_name_starts_at; … … 2688 2688 * ^ this appears one character before the end of the closing ">". 2689 2689 */ 2690 return '/' === $this->html[ $this->token_starts_at + $this->token_length - 1];2690 return '/' === $this->html[ $this->token_starts_at + $this->token_length - ]; 2691 2691 } 2692 2692 -
trunk/src/wp-includes/interactivity-api/class-wp-interactivity-api-directives-processor.php
r57649 r58233 108 108 $bookmark = 'append_content_after_template_tag_closer'; 109 109 $this->set_bookmark( $bookmark ); 110 $after_closing_tag = $this->bookmarks[ $bookmark ]->start + $this->bookmarks[ $bookmark ]->length + 1;110 $after_closing_tag = $this->bookmarks[ $bookmark ]->start + $this->bookmarks[ $bookmark ]->length; 111 111 $this->release_bookmark( $bookmark ); 112 112 … … 141 141 list( $opener_tag, $closer_tag ) = $bookmarks; 142 142 143 $after_opener_tag = $this->bookmarks[ $opener_tag ]->start + $this->bookmarks[ $opener_tag ]->length + 1;143 $after_opener_tag = $this->bookmarks[ $opener_tag ]->start + $this->bookmarks[ $opener_tag ]->length; 144 144 $before_closer_tag = $this->bookmarks[ $closer_tag ]->start; 145 145 -
trunk/tests/phpunit/tests/html-api/wpHtmlTagProcessor.php
r57805 r58233 475 475 476 476 $this->assertSame( '<div wonky><img hidden></div>', $processor->get_updated_html() ); 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 477 580 } 478 581 … … 2747 2850 $this->set_bookmark( 'here' ); 2748 2851 $this->lexical_updates[] = new WP_HTML_Text_Replacement( 2749 $this->bookmarks['here']->start + $this->bookmarks['here']->length + 1,2852 $this->bookmarks['here']->start + $this->bookmarks['here']->length, 2750 2853 0, 2751 2854 $new_html
Note: See TracChangeset
for help on using the changeset viewer.