[wp-trac] [WordPress Trac] #46133: Parse blocks to generate the excerpt
WordPress Trac
noreply at wordpress.org
Wed Apr 24 21:24:25 UTC 2019
#46133: Parse blocks to generate the excerpt
--------------------------------------+-----------------------
Reporter: gziolo | Owner: pento
Type: defect (bug) | Status: assigned
Priority: normal | Milestone: 5.2
Component: Formatting | Version: 5.0
Severity: normal | Resolution:
Keywords: has-patch has-unit-tests | Focuses:
--------------------------------------+-----------------------
Comment (by azaozz):
@gziolo thanks for the review! :)
> There is going to be core/group block added to Gutenberg after 5.2
release
Yeah, thinking we will need to keep enhancing the way we auto-generate
excerpts for posts and include all blocks that may have relevant text.
The challenge is that we only want "static text" and need to exclude
dynamic blocks as they may cause infinite loop if trying to generate an
excerpt, and in most cases they are not particularly relevant to the rest
of the post.
Ideally we should parse all "text containing blocks" regardless if they
are wrapped in "container" blocks. The current patch only looks one level
deep in all whitelisted blocks, and has an exception for `core/columns`
where it looks inside each column. This can be enhanced and perhaps can be
done better. Planning to look at it again for 5.3.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/46133#comment:11>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list