Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tag processor/dangerously replace contents #46080

Closed
wants to merge 11 commits into from

Conversation

dmsnell
Copy link
Member

@dmsnell dmsnell commented Nov 25, 2022

Note: This is experimental stuff. Here be 🐉 🐉. Please ignore 😄

dmsnell and others added 8 commits November 24, 2022 20:06
…ns in document

It can be helpful to track a location in an HTML document while updates are being made to it
such that we can instruct the Tag Processor to seek to the location of one of the bookmarks.

In this patch we're introducing a bookmarks system to do just that. The bookmark is a resource
handle that represents an internal tracking object which will follow all updates made to the
document. It will be possible to rewind or jump around a document by setting a bookmark.
@dmsnell dmsnell requested a review from adamziel November 25, 2022 22:07
@codesandbox
Copy link

codesandbox bot commented Nov 25, 2022

CodeSandbox logoCodeSandbox logo  Open in CodeSandbox Web Editor | VS Code | VS Code Insiders

@dmsnell dmsnell changed the base branch from trunk to tag-processor/add-bookmarks November 25, 2022 22:07
@dmsnell dmsnell requested a review from ockham November 25, 2022 22:07
while ( $depth > 0 && $p->next_tag( [ 'tag_name' => $tag, 'tag_closers' => 'visit' ] ) ) {
$depth += $p->is_tag_closer() ? -1 : 1;

if ( $depth === 0 ) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error out if the closer has a different tag name than the opener?

@ockham ockham force-pushed the tag-processor/add-bookmarks branch from c5f3cc0 to bc7221f Compare November 29, 2022 12:58
@dmsnell dmsnell force-pushed the tag-processor/add-bookmarks branch 3 times, most recently from 6026b5d to 5fcf00d Compare December 2, 2022 03:03
Base automatically changed from tag-processor/add-bookmarks to trunk December 2, 2022 03:46
@gziolo gziolo added the [Feature] Block API API that allows to express the block paradigm. label Jan 31, 2023
@gziolo gziolo added [Feature] HTML API An API for updating HTML attributes in markup and removed [Feature] Block API API that allows to express the block paradigm. labels Apr 18, 2023
@dmsnell
Copy link
Member Author

dmsnell commented May 4, 2023

Closing because this is outdated and work has moved into Core to explore this in dmsnell/wordpress-develop#6 and adamziel/wordpress-develop#2

@dmsnell dmsnell closed this May 4, 2023
@dmsnell dmsnell deleted the tag-processor/dangerously-replace-contents branch May 4, 2023 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] HTML API An API for updating HTML attributes in markup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants