# Edit summaries/revision history cannot handle MathJax properly

Sometimes if somebody edits the MathJax part of a question or answer MathJax breaks down in the revision history, creating italics and messing up formatting so that its really hard to see what changed. An example follows, here one can still tell what changed (which is not always the case) but it is messy (like the and that is somehow its own paragraph right in the middle).

• Would it be better if MathJax was disabled in diffs? – Peter Krautzberger Jan 17 '17 at 18:47
• Could you provide the link to the question for which this was an edit, as shown in the edit history. Because I think part of the problem may have been, in part, do to using single dollar signs along with regular text inside of double dollar signs. – amWhy Jan 17 '17 at 18:51
• Actually, I think that's precisely what happened here. If this is how the edit rendered, it was the fault of the editor for being seriously careless in their use of dollar signs. – amWhy Jan 17 '17 at 18:58
• @amWhy this revision history: math.stackexchange.com/posts/2094498/revisions however the question itself is rendered correctly on the main page (re: editor being careless). – s.harp Jan 17 '17 at 19:00
• There are three modes in which to review an edit history: in-line, side-by-side, and side-by-side markdown. If your aren't reading in side-by-side markdown mode, edit reviews will look sort of like what you posted. You ask a good question though. Why the other modes looks so "mis-formatted", I can't answer. In my first comment above, I was looking at the screen shot you posted, which, on first appearance, looks like a mess. But look at the the three links (tabs), on the left when you click on edit history, below the header showing the edit number. Click on side-by-side markdown. – amWhy Jan 17 '17 at 19:12
• See this link. I copied the URL to the side-by-side markdown mode, so you can see what the edits really are. – amWhy Jan 17 '17 at 19:17
• for the HTML diff to work correctly we'd have to modify our diff engine, so that it scopes the change to containing/outer mathjax block, I guess – m0sa Feb 14 '17 at 14:33
• @m0sa: While not ideal, it would be enough if you could just ask it to render the previous version and the new version side by side without the diff. – user14972 Feb 28 '17 at 4:57

The problem is caused by the green and red highlighting, if you look closely, you can see $'s in them. These $ aren't counted properly as MathJax, and therefor, the whole rendering breaks down.