-
Notifications
You must be signed in to change notification settings - Fork 0
Block processor void block trailinghtml #20
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
Conversation
| 'abc', | ||
| ), | ||
| ); | ||
| $expected = parse_blocks( $html )[0]; |
There was a problem hiding this comment.
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 :)
There was a problem hiding this comment.
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()").
Initially ported from sirreal#20 Co-authored-by: Jon Surrell <[email protected]>
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
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
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
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
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
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
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
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
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
|
full test suite in WordPress#10769 |
|
Unless I have misread the tests or neglected something, this should be resolved as of the merge of WordPress@d3068ae |
Noodling…