-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Server directive processing: Stop processing non-interactive blocks (#…
…56302) * Initial commit * It works, but is stripping comments * Added an extra return for debugging * Refactor to use string instead of arrays to compare * Use hidden textarea to save comments in production html * Use divs as delimiters, comments not working for interactive innner components * Back to array for references and comment delimiters * Something is working :-) * Refactor, process working * experiment replacing inner blocks * now working if there is only 1 interactive block * now working with 2 interactive blocks * Commented stopping at first custom element, after innerblocks is not being processed otherwise * Try using bookmarks, fix autoclosing tag not working * Not using bookmarks anymore, just processing inner inside processing function * Seems to be working, still needs a good test battery * Fix interactivity API directive processing * Remove tests that will be updated in next commits * Add markup tests * Use correct div group structure * Small refactor * remove not needed block name in interactive markers * Add more markup tests * refactor tests * Make inner blocks optional * Move directives declaration to declare them only if needed * Refactor more code, thanks to @DAreRodz * Remove only the first ocurrence * Improve comments and format * Update tests to use HTML API, fix non interactive blocks not being parsed * Unmark children of interactive blocks according to @DAreRodz comment * Add a p tag check test * Execute directives by priority * Remove gutenberg name from tests and use camelCase for context property * Fix empty style attribute error * Add test for directive ordering * Fix evaluate should only execute anonymous functions test * Fix wp-style tests * Improve tests * Test that we don't process non-interactive blocks * Stop unmarking children of interactive blocks * Move directives inside gutenberg_process_interactive_html --------- Co-authored-by: Luis Herranz <[email protected]> Co-authored-by: David Arenas <[email protected]>
- Loading branch information
1 parent
ec2c51d
commit 1f9b753
Showing
5 changed files
with
506 additions
and
217 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.