Since the flexible-content field is only in the pro, I don’t think it’d be a good idea for me to include the full file, but here is a diff:
https://gist.github.com/trex005/409f1fd873b9487a040ec79b6440a0cf
If there is any interest I can look into turning it into an addon.