Skip to main content
[Edit removed during grace period]
Source Link
Source Link
zcoop98
  • 11.1k
  • 3
  • 28
  • 62

This issue doesn't seem to have anything to do with tags, especially since it's replicable here on MSE where virtually no language hints have a tag with the same name.

Instead, like you mentioned in your edit, it seems like we've got two distinct issues here:

  1. Highlighting in post previews is broken, possibly because it wasn't updated to use the new rules now applied to actual, rendered posts.

    E.g. using lang-nonexistent on a post still produces highlighting in preview:

    Highlighted code despite garbage lang hint

    Despite this not doing anything in rendered posts:

    console.log('Hello highlighter!'); 
  2. Many aliases are now completely broken, and do not produce any highlighting. E.g., for JavaScript there are 5 aliases:

    lang-javascript, lang-js, (lang-jsx, lang-mjs, lang-cjs)

    But only the lang-js appears to actually work when posted:

    lang-javascript
    console.log('Hello highlighter!'); 
    lang-js
    console.log('Hello highlighter!'); 
    lang-jsx
    console.log('Hello highlighter!'); 
    lang-mjs
    console.log('Hello highlighter!'); 
    lang-cjs
    console.log('Hello highlighter!'); 

    Despite all of the above working in preview:

    All five above code blocks highlighted properly in preview