Originally Posted by ghostyjack
That's basically what happended to me.
I was cleaning out messy Calibre code and replacing <p> tags with proper heading tags when I must have missed something and then it all disappears with an auto-clean.
The answer to that is, of course, don't enable auto-clean and restrict yourself to Pretty Print for manual tidying. And press Ctrl-S first!