9

The code in my answer over at Stack Overflow highlights very strangely:

The identifier ‘NodeRSA’ changes colour in the middle

I discovered this at Stack Overflow, but it affects just as much all other Stack Exchange sites with highlighting enabled (I checked Code Review and Electrical Engineering). I don’t know if this is specific to JavaScript or affects anything else; I remember something similar happening before, but this is the only test case I have got at the ready.

Note that when using the latest version of Highlight.js (11.5.1), this does not happen:

same code with new version of highlight.js

So this is matter of outdated third party tool used by Stack Exchange to highlight code (version 11.0.1).

12
  • The highlighting used is probably javascript. That said this is caused by the third party tool SE uses for highlighting (highlight js). So therefore this is off-topic here and should reported with them.
    – Luuklag
    May 8 at 7:31
  • 7
    @Luuklag The bug isn't present in latest highlight.js: i.stack.imgur.com/wxO4v.png, SO is just out of date... as always. May 8 at 7:32
  • @Nick yeah, taking long time for SE to adopt, or upgrade, but that can't be helped. I'm going to edit your comment into the bug report though, to keep it from being closed. May 8 at 7:53
  • 3
    @Justin why did you remove my edit? This is relevant to the bug report. Please don't remove it. May 8 at 7:59
  • 1
    @ShadowWizardSaysNoMoreWar: I didn't mean to. I was already editing the post before you :) Saving the edit must have removed your edit..
    – Justin
    May 8 at 8:00
  • 2
    @Justin weird, usually there's a banner warning about it, though it doesn't block submitting the edit, yeah. May 8 at 8:03
  • 2
  • It also has problems with CSS. Though it could be for a different reason. May 8 at 9:34
  • 1
    Why would these kind of questions be closed as off-topic? 1) Stack Overflow the company could choose to change to another syntax highlighter (they already did it once), 2) change the version in use, and/or 3) change the way it is being implemented (for example, due to its buggy nature, turn it off by default (explicit syntax highlighting hints required) or greatly limit the places where it is applied). May 8 at 9:48
  • @This_is_NOT_a_forum it's a gray zone, since it's third party tool. Bugs in the tool itself can't be fixed by SE, so strictly speaking, off topic. Replacing to different tool should be asked as new feature request, not part of bug report. May 8 at 9:53
  • 2
    Bugs in the tool itself can't be fixed by SE — yes, they can. SE can patch the library and vendor it, or push the patch upstream. This is making excuses for laziness. May 8 at 10:02
  • As per the FAQ, it's unlikely that SE will develop the patch. SE may only update the version used here, that's all. yesterday

0

You must log in to answer this question.

Browse other questions tagged .