Closed
Conversation
|
Flaky tests detected in 35bd051. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4053307533
|
Contributor
Author
1 task
Closed
4 tasks
Contributor
Author
|
Closing. Per recent discussions, we're going to unblock the work in the BHE repo by implementing missing features in a subclass of Development of the HTML Processor API is expected to progress more cautiously/slowly, to take into account more exotic HTML constructs; it will happen in (forks of) the |
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What?
Part of #44410.
Add
WP_HTML_Processor, a subclass ofWP_Tag_HTML_Processor, which allows "broader" access to the parsed HTML, by providing theget_content_inside_balanced_tags()method, and some related helper methods, such asbalanced_next().Why?
This is a requirement for the Block Interactivity API (see WordPress/block-interactivity-experiments#120). Furthermore,
balanced_next()is also a prerequisite forset_content_inside_balanced_tags()(see #47036).How?
The code is copy-pasted from @dmsnell's #46345 (which has a much wider scope). I've only applied some formatting, fixed some lint errors, and added some PHPDoc.
Testing Instructions
See unit tests!
TODO
WP_HTML_Processor_Scan_State@since