Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parser: Normalize data types and fix default implementation #10107

Merged
merged 5 commits into from
Oct 6, 2018

Commits on Oct 4, 2018

  1. Parser: Normalize data types and fix default implementation

    Resolves #10041
    Resolves #10047
    
    A few inconsistencies have remained in the grammar specification
    concerning freeform blocks and blocks without attributes in the
    block delimiters. Freeform blocks were returned without block
    names and blocks without attributes returned `null` instead of
    an empty set of attributes.
    
    Further, the default parser implementation (from #8083) was
    returning an array of block objects instead of an array of
    generic arrays. This resulted in mismatches in PHP of accessing
    properties with `$block[ 'attrs' ]` syntax vs `$block->attrs`
    syntax.
    
    In this patch I've updatd the specification to remove all of
    the type ambiguity and have updated the default parser to match
    it. After this patch every block should be accessible as a normal
    array in PHP and have all properties: `blockName`, `attrs`,
    `innerBlocks`, and `innerHTML`. If no attributes are specified
    then `attrs` will be an empty set (in JavaScript `{}` and in
    PHP `array()`).
    dmsnell authored and mcsf committed Oct 4, 2018
    Configuration menu
    Copy the full SHA
    bf17aab View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    0b778b6 View commit details
    Browse the repository at this point in the history

Commits on Oct 5, 2018

  1. Configuration menu
    Copy the full SHA
    1b686b6 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    452ce96 View commit details
    Browse the repository at this point in the history

Commits on Oct 6, 2018

  1. Configuration menu
    Copy the full SHA
    25d31ca View commit details
    Browse the repository at this point in the history