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

Content Parsers: Update parsers, fix list-item parsing, fix broken manifest #247

Merged
merged 5 commits into from
Apr 4, 2023

Conversation

ryelle
Copy link
Contributor

@ryelle ryelle commented Apr 3, 2023

This PR updates the parsers using the code added in WordPress/wordpress.org#90, and adds a phpunit env and tests for the parser.

I wanted to fix the list issue #211 so that it didn't require a manual update each time build:patterns was run, and I've had this branch half-done for a while in the wporg-mu-plugins repo, but it seems faster to iterate on the parsers here.

This is probably easier to review going commit-by-commit:

Fixes #179, closes #181, fixes #211.

Props @adamwoodnz @dd32 for most of the code, I've just moved it around 🙂

How to test the changes in this Pull Request:

  1. Run composer update to get the latest packages
  2. Run yarn build:patterns to see the parsers still process the patterns
  3. Run yarn test:php to run the unit tests

ryelle added 5 commits April 3, 2023 14:14
This includes the updates from WordPress/wordpress.org#90, a new AttributeParser for attribute-only blocks, and a fix for the ListItem block to allow child lists.
Fixes #211
@ryelle ryelle self-assigned this Apr 3, 2023
@ryelle ryelle requested a review from adamwoodnz April 3, 2023 18:33
@ryelle ryelle added the [Component] Tools Build tools, packages, etc label Apr 3, 2023
@ryelle ryelle marked this pull request as ready for review April 3, 2023 18:33
@ryelle ryelle changed the title Update/parsers Content Parsers: Update parsers, fix list-item parsing, fix broken manifest Apr 3, 2023
Copy link
Contributor

@adamwoodnz adamwoodnz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 LGTM

Thanks so much for working on this, and cleaning up the Swag page, oops!

Tested as instructed, also checked patterns loaded locally. Not exactly sure what changed in History, but page looks correct 🤷‍♂️

:shipit:

@ryelle
Copy link
Contributor Author

ryelle commented Apr 4, 2023

Not exactly sure what changed in History, but page looks correct

Yeah, my local git client showed the exact change better, it's this:

- <td>No <?php _e( 'Musician', 'wporg' ); ?> chosen.</td>
+ <td><?php _e( 'No musician chosen.', 'wporg' ); ?></td>

Not sure why the parser only pulled out "Musician" in the first place 🤷🏻

@ryelle ryelle merged commit d7f6bbd into trunk Apr 4, 2023
@ryelle ryelle deleted the update/parsers branch April 4, 2023 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Component] Tools Build tools, packages, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Only one level of bulleted list is displayed Unit tests for export-content parsers
2 participants