# GCODE highlighting is not included by default

**URL:** <https://meta.discourse.org/t/gcode-highlighting-is-not-included-by-default/80143>\
**Category:** Support\
**Created:** [February 9, 2018, 12:02am UTC](https://meta.discourse.org/t/gcode-highlighting-is-not-included-by-default/80143 "2018-02-09T00:02:42Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![filip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/filip/32/70415_2.png) [@filip](https://meta.discourse.org/u/filip)\
**Post date:** [February 9, 2018, 12:02am UTC](https://meta.discourse.org/t/gcode-highlighting-is-not-included-by-default/80143/1 "2018-02-09T00:02:43Z")

</div>

Hi,

### Trouble

.gcode highlighting is confused, even though [gcode is a supported language in highlight.js](https://github.com/isagalaev/highlight.js/blob/master/src/languages/gcode.js).

### A simple test

auto language selection (maybe some sort of C? )

```plaintext
M117 Heating Up ; write heating up
M190 S30 ; heat up the bed to 30°C and hold

```

ruby specified (yay. this is to show that forced language selection does something)

```ruby
M117 Heating Up ; write heating up
M190 S30 ; heat up the bed to 30°C and hold

```

gcode specified (nay, it looks like the auto-select, and it ain’t right.)

```gcode
M117 Heating Up ; write heating up
M190 S30 ; heat up the bed to 30°C and hold

```

### thus

Is there some test I can do to see whether this is on Discourse side or Highlight.js side?  
(And then, what would that mean…)

---

<div class="post-metadata">

**Author:** ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)\
**Post date:** [February 9, 2018, 12:38am UTC](https://meta.discourse.org/t/gcode-highlighting-is-not-included-by-default/80143/2 "2018-02-09T00:38:07Z")

</div>

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:

 ![image](https://global.discourse-cdn.com/meta/original/3X/c/3/c3bd586ac7f5fd94367e53a9826a19db38f346ba.png)

---

<div class="post-metadata">

**Author:** ![filip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/filip/32/70415_2.png) [@filip](https://meta.discourse.org/u/filip)\
**Post date:** [February 9, 2018, 2:12pm UTC](https://meta.discourse.org/t/gcode-highlighting-is-not-included-by-default/80143/3 "2018-02-09T14:12:42Z")

</div>

Thanks for a swift reply.

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.

 ![image](https://global.discourse-cdn.com/meta/original/3X/5/9/59d2993d2b8641542049ce539912b44643309143.jpg)

Thanks!

---

<div class="post-metadata">

**Author:** ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)\
**Post date:** [February 9, 2018, 3:06pm UTC](https://meta.discourse.org/t/gcode-highlighting-is-not-included-by-default/80143/4 "2018-02-09T15:06:33Z")

</div>

That you’d need to take up with highlight.js. Glad you got it working!

---

<div class="post-metadata">

**Author:** ![jomaxro](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/jomaxro/32/126216_2.png) [@jomaxro](https://meta.discourse.org/u/jomaxro)\
**Post date:** [February 10, 2018, 11:00pm UTC](https://meta.discourse.org/t/gcode-highlighting-is-not-included-by-default/80143/5 "2018-02-10T23:00:06Z")

</div>

This topic was automatically closed after 46 hours. New replies are no longer allowed.
