I don't know how long this has been happening, but I recently noticed what seems to be a regression: after clicking the "An edit has been made to this post" banner that appears when a question or an answer has been edited while you're viewing it, any code syntax highlighting or math formatting in the post fails to render.

Steps to reproduce:

  1. Open a question with highlighted code or MathJax markup that is likely to get edited soon. (The newest questions page on SO or math.SE is a good place to find some.)
  2. Leave the question open until someone edits it and the "An edit has been made to this post" banner appears. (For efficiency, open several questions in separate tabs and wait a few minutes until one of them gets edited.)
  3. Click the banner. Observe that the question gets reloaded, but it loses any syntax highlighting or math formatting.

(The bug also occurs for edited answers, but those tend to be harder to find on demand. Unfortunately, editing a post yourself while having it open in another tab doesn't seem to work, since the banner never appears in that case.)

FWIW, the cause of this bug appears to be a missing call to styleCode() (or equivalent code) in the reloadPosts function in realtime-se.js, as included in the full.en.js bundle. (In particular, running styleCode() from the browser JavaScript console after reloading the post restores the missing syntax highlighting.) I'm pretty sure this used to work automatically, so I suspect this is a regression caused by some recent code reorganization.

You must log in to answer this question.

Browse other questions tagged .