hexo-migrator-wordpress
hexo-migrator-wordpress copied to clipboard
--paragraph-fix should be default
I dont see why running the migrator should have --paragraph-fix
as an option. It should just fix it by default.
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.
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.
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?