When using triple backticks to enclose code blocks, Discourse will attempt to autodetect the language using highlight.js. If this does not do what you expect, you can type a language name after the first set of backticks:
E.g.
``` ruby
3.times do |stuff|
stuff.do
end
```
Result:
3.times do |stuff|
stuff.do
end
The chosen language must match be one of the highlighted_languages
configured for the site.
If that does not work, please talk to your site administrator. See: Configure which programming languages are available for syntax highlighting
Suppress highlighting
To prevent any highlighting at all, you can choose “text” instead:
``` text
Your text to NOT highlight here
```
Your text to NOT highlight here