That was my first try also because this is the canonical language identifier for syntax highlighting in fenced code blocks on GitHub (though the cpp
alias is also supported):
https://github.com/github/linguist/blob/v7.14.0/lib/linguist/languages.yml#L636
I haven't managed to find the language code list for Discourse though. They say they use highlight.js
, and there is a list of languages here:
https://github.com/highlightjs/highlight.js/blob/main/SUPPORTED_LANGUAGES.md
but I don't get the expected results based on that information. For example:
```cxx
void setup()
{
}
```
void setup()
{
}