[wp-trac] [WordPress Trac] #61348: HTML API: Report real and virtual nodes in the HTML Processor.

WordPress Trac noreply at wordpress.org
Thu Jun 27 20:47:55 UTC 2024


#61348: HTML API: Report real and virtual nodes in the HTML Processor.
-------------------------------------------------+-------------------------
 Reporter:  dmsnell                              |       Owner:  dmsnell
     Type:  enhancement                          |      Status:  reopened
 Priority:  normal                               |   Milestone:  6.6
Component:  HTML API                             |     Version:  trunk
 Severity:  normal                               |  Resolution:
 Keywords:  has-patch has-unit-tests needs-dev-  |     Focuses:
  note dev-feedback                              |
-------------------------------------------------+-------------------------

Comment (by dmsnell):

 In [changeset:"58588" 58588]:
 {{{
 #!CommitTicketReference repository="" revision="58588"
 HTML API: Report breadcrumbs properly when visiting virtual nodes.

 When [58304] introduced the abililty to visit virtual nodes in the HTML
 document,
 those being the nodes which are implied by the HTML but no explicitly
 present in
 the raw text, a bug was introduced in the `get_breadcrumbs()` method
 because it
 wasn't updated to be aware of the virtual nodes. Therefore it would report
 the
 wrong breadcrumbs for virtual nodes. Since the new `get_depth()` method is
 based
 on the same logic it was also broken for virtual nodes.

 In this patch, the breadcrumbs have been updated to account for the
 virtual nodes
 and the depth method has been updated to rely on the fixed breadcrumb
 logic.

 Developed in https://github.com/WordPress/wordpress-develop/pull/6914
 Discussed in https://core.trac.wordpress.org/ticket/61348

 Follow-up to [58304].

 Props dmsnell, jonsurrell, zieladam.
 See #61348.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/61348#comment:15>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list