supported code high lighters on forum - add gcode?
-
Oh that's great. I had no idea ````json was a thing. Looks much better. Even if that was the default that would be great.
-
@droftarts said in supported code high lighters on forum - add gcode?:
what the forum software (I forget what it is, momentarily)
DISCOURSE I think
-
@arhi said in supported code high lighters on forum - add gcode?:
DISCOURSE I think
Nope, I finally remembered... NodeBB.
Ian
-
Just doing some googling for nodeBB and code blocks and it looks like it's fairly customizable. So maybe not impossible. Would be up to @T3P3Tony to dig into it though.
-
I think someone might have done something? Line numbering seems to be a new thing, or maybe just a side effect of people using various specific language tags as opposed to the default?
-
I just noticed that line numbers are showing up now as well
json:
M667 S1 ; Select CoreXY mode M208 X0 Y0 Z-0.5 S1 ; Set axis minima M208 X325 Y273 Z305 S0 ; Set axis maxima (x has 295 printable reach) M569 P0 S0 ; Drive 0 (x) goes backwards M569 P1 S0 ; Drive 1 (y) goes backwards M569 P2 S0 ; Drive 2 (z) goes backwards M569 P3 S0 ; Drive 3 (e) goes backwards
default:
M667 S1 ; Select CoreXY mode M208 X0 Y0 Z-0.5 S1 ; Set axis minima M208 X325 Y273 Z305 S0 ; Set axis maxima (x has 295 printable reach) M569 P0 S0 ; Drive 0 (x) goes backwards M569 P1 S0 ; Drive 1 (y) goes backwards M569 P2 S0 ; Drive 2 (z) goes backwards M569 P3 S0 ; Drive 3 (e) goes backwards
Html:
M667 S1 ; Select CoreXY mode M208 X0 Y0 Z-0.5 S1 ; Set axis minima M208 X325 Y273 Z305 S0 ; Set axis maxima (x has 295 printable reach) M569 P0 S0 ; Drive 0 (x) goes backwards M569 P1 S0 ; Drive 1 (y) goes backwards M569 P2 S0 ; Drive 2 (z) goes backwards M569 P3 S0 ; Drive 3 (e) goes backwards
Js:
M667 S1 ; Select CoreXY mode M208 X0 Y0 Z-0.5 S1 ; Set axis minima M208 X325 Y273 Z305 S0 ; Set axis maxima (x has 295 printable reach) M569 P0 S0 ; Drive 0 (x) goes backwards M569 P1 S0 ; Drive 1 (y) goes backwards M569 P2 S0 ; Drive 2 (z) goes backwards M569 P3 S0 ; Drive 3 (e) goes backwards
-
-
Someone is being sneaky ... I like it!
-
Good idea, I have added line numbering but pulling in the custom highlighting for gcode etc is not currently working. Any NodeBB experts out there feel free to DM
Test cases:
var s = "JavaScript syntax highlighting"; alert(s);
s = "Python syntax highlighting" print s
G10 X100 ;gcode syntax highlighting (not working)
-
Line numbering may get confusing when only snippets of a larger file are copied and pasted. This isn't line 3, it's actually line 4250!!
-
@bot said in supported code high lighters on forum - add gcode?:
Line numbering may get confusing when only snippets of a larger file are copied and pasted. This isn't line 3, it's actually line 4250!!
I've used
```text
since the numbers were introduced as shown by Ian for this very reason. Line numbers will be usefull when referring to posted configs (snippet or not) etc, just not always if referring to source code maybe.