Changeset 55407
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/html-api/class-wp-html-tag-processor.php
r55402 r55407 723 723 724 724 $this->bookmarks[ $name ] = new WP_HTML_Span( 725 $this->tag_name_starts_at - 1,725 $this->tag_name_starts_at - ( $this->is_closing_tag ? 2 : 1 ), 726 726 $this->tag_ends_at 727 727 ); … … 1505 1505 $this->bytes_already_copied = $this->bytes_already_parsed; 1506 1506 $this->output_buffer = substr( $this->html, 0, $this->bytes_already_copied ); 1507 return $this->next_tag( );1507 return $this->next_tag( array( 'tag_closers' => 'visit' ) ); 1508 1508 } 1509 1509 -
trunk/tests/phpunit/tests/html-api/wpHtmlTagProcessor-bookmark.php
r55315 r55407 61 61 $p->get_updated_html(), 62 62 'Did not seek to the intended bookmark locations' 63 ); 64 } 65 66 /** 67 * @ticket 57787 68 * 69 * @covers WP_HTML_Tag_Processor::seek 70 */ 71 public function test_seeks_to_tag_closer_bookmark() { 72 $p = new WP_HTML_Tag_Processor( '<div>First</div><span>Second</span>' ); 73 $p->next_tag( array( 'tag_closers' => 'visit' ) ); 74 $p->set_bookmark( 'first' ); 75 $p->next_tag( array( 'tag_closers' => 'visit' ) ); 76 $p->set_bookmark( 'second' ); 77 78 $p->seek( 'first' ); 79 $p->seek( 'second' ); 80 81 $this->assertSame( 82 'DIV', 83 $p->get_tag(), 84 'Did not seek to the intended bookmark location' 63 85 ); 64 86 }
Note: See TracChangeset
for help on using the changeset viewer.