Skip to content

Conversation

@sirreal
Copy link
Owner

@sirreal sirreal commented Jan 21, 2026

Noodling…

'abc',
),
);
$expected = parse_blocks( $html )[0];
Copy link
Collaborator

Choose a reason for hiding this comment

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

I expected to use expected as expected but then expected was reassigned :)

Copy link
Owner Author

Choose a reason for hiding this comment

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

Yes, this was quick and dirty debugging. Keeping you on your toes 😉

(Originally I wanted a static view of what was expected, but it was more comfortable to assert "produce the same result as parse_blocks()").

dmsnell added a commit to dmsnell/wordpress-develop that referenced this pull request Jan 21, 2026
Initially ported from sirreal#20

Co-authored-by: Jon Surrell <[email protected]>
dmsnell added a commit to dmsnell/wordpress-develop that referenced this pull request Jan 21, 2026
Trac ticket: Core-64537

Initially ported from sirreal#20

Developed in: WordPress#10769
Discussed in: https://core.trac.wordpress.org/ticket/64537#ticket

Follow-up to [[60939]](https://core.trac.wordpress.org/changeset/60939).

Props jonsurrell, dmsnell.
Fixes Core-64537

Co-authored-by: Jon Surrell <[email protected]>
Github-PR: 10769
Github-PR-URL: WordPress#10769
Trac-Ticket: 64537
Trac-Ticket-URL: https://core.trac.wordpress.org/ticket/64537
Branch-Name: blocks/add-block-processor-tests
dmsnell added a commit to dmsnell/wordpress-develop that referenced this pull request Jan 21, 2026
Trac ticket: Core-64537

Initially ported from sirreal#20

Developed in: WordPress#10769
Discussed in: https://core.trac.wordpress.org/ticket/64537#ticket

Follow-up to [[60939]](https://core.trac.wordpress.org/changeset/60939).

Props jonsurrell, dmsnell.
Fixes Core-64537

Co-authored-by: Jon Surrell <[email protected]>
Github-PR: 10769
Github-PR-URL: WordPress#10769
Trac-Ticket: 64537
Trac-Ticket-URL: https://core.trac.wordpress.org/ticket/64537
Branch-Name: blocks/add-block-processor-tests
dmsnell added a commit to dmsnell/wordpress-develop that referenced this pull request Jan 21, 2026
Trac ticket: Core-64537

Initially ported from sirreal#20

Developed in: WordPress#10769
Discussed in: https://core.trac.wordpress.org/ticket/64537#ticket

Follow-up to [[60939]](https://core.trac.wordpress.org/changeset/60939).

Props jonsurrell, dmsnell.
Fixes Core-64537

Co-authored-by: Jon Surrell <[email protected]>
Github-PR: 10769
Github-PR-URL: WordPress#10769
Trac-Ticket: 64537
Trac-Ticket-URL: https://core.trac.wordpress.org/ticket/64537
Branch-Name: blocks/add-block-processor-tests
dmsnell added a commit to dmsnell/wordpress-develop that referenced this pull request Jan 21, 2026
Trac ticket: Core-64537

Initially ported from sirreal#20

Developed in: WordPress#10769
Discussed in: https://core.trac.wordpress.org/ticket/64537#ticket

Follow-up to [[60939]](https://core.trac.wordpress.org/changeset/60939).

Props jonsurrell, dmsnell.
Fixes Core-64537

Co-authored-by: Jon Surrell <[email protected]>
Github-PR: 10769
Github-PR-URL: WordPress#10769
Trac-Ticket: 64537
Trac-Ticket-URL: https://core.trac.wordpress.org/ticket/64537
Branch-Name: blocks/add-block-processor-tests
dmsnell added a commit to dmsnell/wordpress-develop that referenced this pull request Jan 21, 2026
Trac ticket: Core-64537

Initially ported from sirreal#20

Developed in: WordPress#10769
Discussed in: https://core.trac.wordpress.org/ticket/64537#ticket

Follow-up to [[60939]](https://core.trac.wordpress.org/changeset/60939).

Props jonsurrell, dmsnell.
Fixes Core-64537

Co-authored-by: Jon Surrell <[email protected]>
Github-PR: 10769
Github-PR-URL: WordPress#10769
Trac-Ticket: 64537
Trac-Ticket-URL: https://core.trac.wordpress.org/ticket/64537
Branch-Name: blocks/add-block-processor-tests
dmsnell added a commit to dmsnell/wordpress-develop that referenced this pull request Jan 21, 2026
Trac ticket: Core-64537

Initially ported from sirreal#20

Developed in: WordPress#10769
Discussed in: https://core.trac.wordpress.org/ticket/64537#ticket

Follow-up to [[60939]](https://core.trac.wordpress.org/changeset/60939).

Props dmsnell, jonsurrell, jorbin.
Fixes Core-64537

Co-Authored-By: Jon Surrell <[email protected]>
Co-Authored-By: Aaron Jorbin <[email protected]>
Github-PR: 10769
Github-PR-URL: WordPress#10769
Trac-Ticket: 64537
Trac-Ticket-URL: https://core.trac.wordpress.org/ticket/64537
Branch-Name: blocks/add-block-processor-tests
dmsnell added a commit to dmsnell/wordpress-develop that referenced this pull request Jan 21, 2026
Trac ticket: Core-64537

Initially ported from sirreal#20

Developed in: WordPress#10769
Discussed in: https://core.trac.wordpress.org/ticket/64537#ticket

Follow-up to [[60939]](https://core.trac.wordpress.org/changeset/60939).

Props dmsnell, jonsurrell, jorbin.
Fixes Core-64537

Co-Authored-By: Jon Surrell <[email protected]>
Co-Authored-By: Aaron Jorbin <[email protected]>
Github-PR: 10769
Github-PR-URL: WordPress#10769
Trac-Ticket: 64537
Trac-Ticket-URL: https://core.trac.wordpress.org/ticket/64537
Branch-Name: blocks/add-block-processor-tests
dmsnell added a commit to dmsnell/wordpress-develop that referenced this pull request Jan 21, 2026
Trac ticket: Core-64537

Initially ported from sirreal#20

Developed in: WordPress#10769
Discussed in: https://core.trac.wordpress.org/ticket/64537#ticket

Follow-up to [[60939]](https://core.trac.wordpress.org/changeset/60939).

Props dmsnell, jonsurrell, jorbin.
Fixes Core-64537

Co-Authored-By: Jon Surrell <[email protected]>
Co-Authored-By: Aaron Jorbin <[email protected]>
Github-PR: 10769
Github-PR-URL: WordPress#10769
Trac-Ticket: 64537
Trac-Ticket-URL: https://core.trac.wordpress.org/ticket/64537
Branch-Name: blocks/add-block-processor-tests
dmsnell added a commit to dmsnell/wordpress-develop that referenced this pull request Jan 21, 2026
WordPress#10769)

Trac ticket: Core-64537

Initially ported from sirreal#20

The behavior of WP_Block_Processor::extract_full_block_and_advance()
should produce an identical output to what parse_blocks() would return
on the same substring of input.

Unfortunately, when HTML spans followed inner blocks, they were being
omitted in the output parse tree. This was due to an omission in the
original code which would look for those blocks before advancing again
after calling `extract_full_block_and_advance()` recursively.

This patch adds the missing check and resolves the discrepancy.

Developed in: WordPress#10769
Discussed in: https://core.trac.wordpress.org/ticket/64537#ticket

Follow-up to [[60939]](https://core.trac.wordpress.org/changeset/60939).

Props dmsnell, jonsurrell, jorbin.
Fixes Core-64537

Co-Authored-By: Jon Surrell <[email protected]>
Co-Authored-By: Aaron Jorbin <[email protected]>
Github-PR: 10769
Github-PR-URL: WordPress#10769
Trac-Ticket: 64537
Trac-Ticket-URL: https://core.trac.wordpress.org/ticket/64537
Branch-Name: blocks/add-block-processor-tests
@dmsnell
Copy link
Collaborator

dmsnell commented Jan 21, 2026

full test suite in WordPress#10769

@dmsnell
Copy link
Collaborator

dmsnell commented Jan 22, 2026

Unless I have misread the tests or neglected something, this should be resolved as of the merge of WordPress@d3068ae

@sirreal sirreal closed this Jan 22, 2026
@sirreal sirreal deleted the block-processor-void-block-trailinghtml branch January 22, 2026 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants