Conversation
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
…4427) Trac ticket: Core-66176 See WordPress/wordpress-develop#13720 There has been a known memory explosion for posts with deep stacks of unclosed blocks. These posts experience exponential memory use and can require gigabytes of memory to parse completely. This was due to a mismatch in the spec and default parsers which led to catastrophic string duplciation on account of how the default parser closed out these blocks. In this patch, the behavior is updated to implicitly close all open blocks when the end of the document is reached. This remains divergent from the spec parser, which treats a failure to find the closing delimiters as one giant freeform block, but the behavior should be better in general for truncated posts, given that it leaves intact as many elements of the block structure as are viable. Github-PR: 74427 Github-PR-URL: #74427
This patch unifies parsing between `WP_Block_Parser` and `WP_Block_Processor`, which brings the additional benefit of the optimizations in `WP_Block_Processor`.
This patch unifies parsing between `WP_Block_Parser` and `WP_Block_Processor`, which brings the additional benefit of the optimizations in `WP_Block_Processor`.
See WordPress/gutenberg#74427. When reaching the end of a document during block parsing, and blocks remain open, existing open blocks should implicitly close. Previously, there was a mistake in the closing code which duplicated content in the implicitly-closed blocks. In this patch, the semantic actions of closing blocks is extracted for easier identification of the logic, and the defect is resolved.
26b34f0 to
236659f
Compare
Trac ticket: Core-66176
See WordPress/gutenberg#74427.
Dependent on #13695.
When reaching the end of a document during block parsing, and blocks
remain open, existing open blocks should implicitly close. Previously,
there was a mistake in the closing code which duplicated content in the
implicitly-closed blocks.
In this patch, the semantic actions of closing blocks is extracted for
easier identification of the logic, and the defect is resolved.