This question already has an answer here:

I recently went to see what is in the queue of the "Suggested Edits" and I saw this:

enter image description here

first I thought that it was just '$' placed wrongly, so I went to edit this myself and saw the following:

enter image description here

this part is clearly correct, so it completely ignored the '$$' that were placed after the ';'.

why does it happens?


marked as duplicate by quid Jan 6 '18 at 14:53

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • $\begingroup$ I think it is a bug after all. Same happened with me some days ago, someone edited one of my questions and it looked pretty much like what you saw. $\endgroup$ – Mohammad Zuhair Khan Jan 6 '18 at 8:37
  • $\begingroup$ If it is considered a bug, it is a longstanding one. One way to mitigate this is, as you articulate, to use the Improve Edit function and preview the proposed changes in that way. Unfortunately this approach is affected by another bug which makes MathJax rendering balky and sometimes fails. $\endgroup$ – hardmath Jan 6 '18 at 14:30

MathJax does not process mathematics that includes HTML tags. The differences between the two versions are shown by inserting HTML tags to mark the sections with the colored background. When those changes are within mathematics, that means there is HTML in the math, and MathJax doesn't render it. That can lead to the end delimiters becoming start delimiters, which inverts the sections that are considered to be mathematics, as you see here, even though there is nothing wrong with the placement of the delimiters in the original text.

Marking differences in a math-aware way would be extremely difficult, so there is probably nothing to be done about this. The best that could be expected, I think, would be for the difference layout engine to disable the delimiters if the math in-between contains HTML, but even that is complicated, as you can't really use regular expressions to locate the mathematics (MathJax's processing of the text is more complicated than that). Because difference pages are not critical parts of the site, I doubt the developers would want to spend time on that.

So I suspect that it is unlikely that this will be changed in the future.


Not the answer you're looking for? Browse other questions tagged .