A user, filip, reported an issue with GCODE highlighting not working properly on the site, despite being a supported language in highlight.js. jomaxro explained that highlight.js supports many languages, but not all are enabled by default for performance reasons. To fix the issue, jomaxro suggested adding GCODE to the “highlighted languages” site setting.
After enabling GCODE, filip reported that the highlighting was still not working correctly, but suspected it was a highlight.js issue, specifically with handling GCODE comments. jomaxro confirmed that this was an issue to be taken up with highlight.js, and was glad that enabling GCODE had improved the situation.
highlight.js supports a very large number of languages. It would result in very poor performance if we supported all languages by default. gcode is not a default language supported, so it will not work here on Meta. You can add support for gcode on your site by adding it to the highlighted languages site setting.
For reference, here are the languages supported on Meta:
After I enabled gcode, the highlighting is still funky/ funky in a completely new way, but now it looks like highlight.js issue. I guess the gcode support is just… not working. Still better than before! just can’t handle gcode comments it seems.