When I am writing a message, I paste a command line as a multiline codeblock, I would like to have it formatted (colorized).
If I paste a json, I can use the following:
```json
{
"field": "value"
}
```
and it’s highlighted/formatted as JSON document.
But it’s a mess with CLI/shell code. Nothing really works with labels like shell, bash, sh (no formatting applied). Only powershell works somehow, but the formatting is broken.
In my post opening backticks are followed by “label” I mentioned, that declares the highlighting I want. It’s a standard markdown syntax for code blocks in Stack Overflow (offical SO docs) and many many other platforms. I believe it’s been pretty much a standard for a very long time.
As I can see, SO uses highlight.js library that contains “bash” highlighting (see their GitHub discussion with an example of “backticks with label”). It’s strange that no standard labels for shell code apply for codeblock highlighting in RocketChat.
I can’t recall which lubrary they use. Plese have a read.
If you read the changelogs et al you will see that the format I mentioned with backticks clearly above & below code has been their “standard” for a year or more (search github). It may not accept labels.
It is the way it is.
They don’t necessarily conform to anyone elses standards, be that SO or anyone else.
That is their perogative. They do what suits them.
Of course if you don’t like that you are free to open a PR in the feature requests repo, or to take the source code and build whatever suits you. The power of open source!