How to set programming language in Discourse?

When I post code snippets in Discourse, the syntax highlighting doesn’t always work correctly. I want to ensure that the correct programming language is used for syntax highlighting. Is there a way to predefine the language for code blocks in Discourse so that the syntax is highlighted correctly based on the language?

Here is the solution I found:
When enclosing code blocks in triple backticks on Discourse, the platform will try to detect the language using highlight.js automatically. However, there may be instances where the autodetection does not highlight the syntax as expected. In such cases, it is possible to define the language manually by specifying the language name after the initial set of backticks.

For example, if you want to highlight PHP code, you can use the following code block syntax:

``` php
echo "Hello, world!";

Similarly, for JavaScript, you can use:

``` js
const greeting = "Hello, world!";

Alternatively, if you do not want any highlighting at all, you can choose “text” instead of a specific programming language as follows:

``` text
Your code block here without any syntax highlighting

I hope this helps!