You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Been trying to work out what the relationship is between the PHP code in newspack-content-converter/lib/content-patcher and so on the rest of the project? I can obviously follow the code along and dig in a bit deeper, but felt I might ask to correct my assumptions and everything may be quicker.
It seems most of the conversion is done via Javascript, processing out the blocks and then using rawHandler to work things through. This is a common approach in a number of WordPress plugins to make the conversion to Gutenberg.
However, I can also see a call out to $blocks_content_patched = $this->patcher_handler->run_all_patches( $html_content, $blocks_content ); which appears to use the PHP in that folder to convert from pre-Gutenberg HTML to blocks. For example, I can see from the test we are doing this.
As far as I can guess, this code is now redudant, or is correcting inconsistencies in the Javascript conversion? Can you help give me a steer here?
The text was updated successfully, but these errors were encountered:
Hey folks,
Thanks for putting together this plugin.
Been trying to work out what the relationship is between the PHP code in
newspack-content-converter/lib/content-patcher
and so on the rest of the project? I can obviously follow the code along and dig in a bit deeper, but felt I might ask to correct my assumptions and everything may be quicker.It seems most of the conversion is done via Javascript, processing out the blocks and then using
rawHandler
to work things through. This is a common approach in a number of WordPress plugins to make the conversion to Gutenberg.However, I can also see a call out to
$blocks_content_patched = $this->patcher_handler->run_all_patches( $html_content, $blocks_content );
which appears to use the PHP in that folder to convert from pre-Gutenberg HTML to blocks. For example, I can see from the test we are doing this.As far as I can guess, this code is now redudant, or is correcting inconsistencies in the Javascript conversion? Can you help give me a steer here?
The text was updated successfully, but these errors were encountered: