the problem actually was that the markcup for code needs to have code tags with an opening one and a closing tag. If you omit closing the tags within the markup ones it will throw this error and this is the cause. In my post I added back the markup for the code since that part was NOT the problem per my comment above.
Anyways, I wanted to clarify to provide the final closing to my findings.
😁
RE: Fix "An image in this post did not save properly" error