What do you do when, in editing with MathJax, what you see in the preview is OK but the result is all messed up?

I tried to edit this answer. When the preview looked OK, I saved the edit, but the actual outcome was a mess. I tried various workarounds, but each time the result, despite a good preview, was worse or introduced a new error. Finally, I tried to cancel all my edits and roll back to the OP's version, but (not really understanding how to do this) only created a labyrinth of newly numbered edits.

Luckily the final result is somewhat an improvement on the original, but it is only half way to being what I wanted. I dare not attempt a further edit for fear of making it worse again.

• Looking at revision 3 and it's source code, my guess is that the problem was most likely the unusual pairing of dollars in the form \$....$$....$$. (Instead of three dollars, you most likely intended to have there one dollar ending the previous group and two dollars starting the centered formula.) – Martin Sleziak Mar 22 at 16:57
• @MartinSleziak : Thanks, that's very helpful. – John Bentin Mar 22 at 18:51