Syntax highlighting for code in forum posts?

It looks like the forum is not adding any syntax highlighting to code snippets.

I’ve got mine formatted like:

~~~haxe
var x = some.code("here"); // comment
~~~

and here’s that block rendered:

var x = some.code("here"); // comment

Is there a setting somewhere that needs to be enabled?

Im not sure you have syntax highlight on discourse, just code blocks. Ill take a look later and see if there is a quick fix.

Just some tests, it looks like syntax highlight is already available, but not showing here, so my guess is ive overridden it somehow, somewhere

<xml>
</xml>
.test {
    attr: value;
}
function  javascriptFn() {
}
class HaxeClass {
   public function something() {
   }
}
3.times do |stuff|
  stuff.do
end

I think this is working now :wink:

1 Like