Automattic / newspack-content-converter

Plugin that enables automated conversion of pre-Gutenberg post content, to Gutenberg blocks content.
GNU General Public License v2.0
46 stars 13 forks source link

Add encoding and decoding of GB blocks to avoid breakage #126

Closed naxoc closed 6 months ago

naxoc commented 6 months ago

Some GB blocks were getting destroyed by the NCC, so this will encode all existing GB blocks before processing and decode again as the last thing.

This also removes some rather agressive commit hooks in this repo. I could not build the project no matter what I tried 🤷‍♀️

To test this, use a post that has a homepage block in it somewhere. Without the patch it gets mangled – with it it does not. Nothing should have changed in the resulting output from running the converter – other than the fact that GB blocks will not get mangled.

gamebits commented 6 months ago

Hi, @naxoc ! Does this PR address any issues related to #116 ?

Also, now that it's merged, could we get a new build of the plugin released?

naxoc commented 6 months ago

Hiya @gamebits ! I think this will address the problem in the issue you link to if they are already blocks, but if you could test it I would be very grateful.

I rolled a release here: https://github.com/Automattic/newspack-content-converter/releases/tag/0.1.3

gamebits commented 6 months ago

Thanks for the new release, @naxoc ! 🎉

Unfortunately, I'm not very involved in migrations on my current a8c team, so I may not have the opportunity to test any specific functionality. But if and when it comes up, I'll let you know!