Skip to content

Conversation

@alshakero
Copy link
Member

@alshakero alshakero commented Oct 20, 2023

Parsing plain text is wasteful, and more importantly breaks core WordPress tests when Blocks Everywhere is enabled.

Because the core tests have a comment with the body "Hello World", which is parsed into a block without a name. And this breaks this assertion, since the comment will contain 6 blocks (not 5) and one of them will be a nameless block with innerHTML=Hello World.

@alshakero alshakero marked this pull request as ready for review October 20, 2023 12:56
@johngodley
Copy link
Member

The core do_blocks doesn't have this check:

https://core.trac.wordpress.org/browser/trunk/src/wp-includes/blocks.php#L1504

Why is it needed here and not in core?

@renancarvalho
Copy link

Hi @johngodley, thank you for reviewing, good point, I think we need it there too. We did not know about this same logic in core. Thank you

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.

4 participants