[wp-trac] [WordPress Trac] #60060: HTML API: Add support for H1-H6 elements in the HTML Processor
WordPress Trac
noreply at wordpress.org
Wed Dec 13 13:25:59 UTC 2023
#60060: HTML API: Add support for H1-H6 elements in the HTML Processor
-------------------------+--------------------------------------
Reporter: dmsnell | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: HTML API | Version: trunk
Severity: normal | Keywords: has-patch has-unit-tests
Focuses: |
-------------------------+--------------------------------------
Previously these have been unsupported, but in this patch we're adding
support for the tags so that the HTML Processor can process documents
containing them.
There was a design discussion about introducing a constant to communicate
"any of the H1 - H6 elements" but this posed a number of challenges that
don't need to be answered in this patch. For the time being, because the
HTML specification treats H1 - H6 specially as a single kind of element,
the HTML Processor uses an internal hard-coded string to indicate this. By
using a hard-coded string it's possible to avoid introducing a class
constant which cannot be made private due to PHP's class design. In the
future, this will probably appear as a special constant in a new constant-
containing class.
cc: @ockham @jonsurrell @westonruter
--
Ticket URL: <https://core.trac.wordpress.org/ticket/60060>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list