Update editor related npm packages for 6.4 RC1.

The npm packages needed a second part to the update for 6.4 RC1.

Props isabel_brison, andrewserong, jsnajdr, wildworks, joen, mciampini, tyxla, youknowriad, ramonopoly, spacedmonkey, dmsnell, mikachan, kishanjasani, czapla, siobhyb, darerodz, luisherranz

See #59411.


git-svn-id: https://develop.svn.wordpress.org/trunk@56945 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Tammie Lister
2023-10-16 19:14:55 +00:00
parent 797bb8d6af
commit f6c0c51706
6 changed files with 1573 additions and 1662 deletions

View File

@@ -48,14 +48,6 @@ class WP_Block_Parser {
*/
public $stack;
/**
* Empty associative array, here due to PHP quirks
*
* @since 4.4.0
* @var array empty associative array
*/
public $empty_attrs;
/**
* Parses a document and returns a list of block structures
*
@@ -69,11 +61,10 @@ class WP_Block_Parser {
* @return array[]
*/
public function parse( $document ) {
$this->document = $document;
$this->offset = 0;
$this->output = array();
$this->stack = array();
$this->empty_attrs = array();
$this->document = $document;
$this->offset = 0;
$this->output = array();
$this->stack = array();
while ( $this->proceed() ) {
continue;
@@ -287,7 +278,7 @@ class WP_Block_Parser {
*/
$attrs = $has_attrs
? json_decode( $matches['attrs'][0], /* as-associative */ true )
: $this->empty_attrs;
: array();
/*
* This state isn't allowed
@@ -318,7 +309,7 @@ class WP_Block_Parser {
* @return WP_Block_Parser_Block freeform block object.
*/
public function freeform( $inner_html ) {
return new WP_Block_Parser_Block( null, $this->empty_attrs, array(), $inner_html, array( $inner_html ) );
return new WP_Block_Parser_Block( null, array(), array(), $inner_html, array( $inner_html ) );
}
/**