hexo-migrator-wordpress icon indicating copy to clipboard operation
hexo-migrator-wordpress copied to clipboard

--paragraph-fix should be default

Open jashsayani opened this issue 4 years ago • 3 comments

I dont see why running the migrator should have --paragraph-fix as an option. It should just fix it by default.

jashsayani avatar Sep 06 '20 05:09 jashsayani

The paragraph fix is achieved by using a potentially unsafe workaround. The workaround may conflict with newer articles written using the new guternberg editor, which doesn't have the paragraph issue.

curbengh avatar Sep 06 '20 06:09 curbengh

What about blogs that have been around for a decade (over tens of wordpress versions) having some older posts written with the older editor and newer posts written with guternberg editor. Will the newer posts break?

Should be a way to safely do this. Some details on the "unsafe" nature would be great. Potential things to watch out for if newer posts are broken with the flag?

Also a disclaimer in the README where the flag is documented.

jashsayani avatar Sep 06 '20 09:09 jashsayani

It should just fix it by default.

This would be amazing if could be done. It would be one less option to worry about. Plus, if it becomes automatic, we can migrate wp sites that have both classic editor and Gutenberg posts.

I noticed that Gutenberg posts have <!-- wp:paragraph -->, <!-- wp:more -->, <!-- wp:image {"sizeSlug":"large"} --> etc. in the post content, but classic editor posts don't. If we check if any <!-- wp:* --> string doesn't exist and automatically apply paragraph fix then maybe this can work?

adnan360 avatar Oct 10 '20 17:10 adnan360