[wp-meta] [Making WordPress.org] #5207: Improve heuristics for detecting block assets
Making WordPress.org
noreply at wordpress.org
Thu May 21 21:18:24 UTC 2020
#5207: Improve heuristics for detecting block assets
------------------------------+---------------------------
Reporter: tellyworth | Owner: coreymckrill
Type: enhancement | Status: assigned
Priority: high | Milestone:
Component: Plugin Directory | Resolution:
Keywords: needs-patch |
------------------------------+---------------------------
Comment (by coreymckrill):
> The plugins in the block directory missing `all_blocks`
I haven't checked the whole list, but at least a couple of them (both from
sortabrilliant) aren't actually blocks. `scratch-pad` is an editor plugin
that adds a text field to the block editor sidebar, but doesn't register
any blocks. `ghstwrtr` adds a block ''style'', but no block types.
In `simple-definition-list-blocks` our regex isn't picking up the
`registerBlockType` call because it expects there to be parentheses and
parameters included, but in this plugin the minified JS looks like this:
{{{
Object(l.registerBlockType)("simple-definition-list-blocks/list",r);
}}}
What if we modified the regex to just look for `registerBlockType`? Seems
like the possibility of false positives is pretty low.
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/5207#comment:5>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list