Discourse markup?

Perhaps I missed it somewhere or it is regarded just common knowledge: Is there a help page for the markdown language used here? I had to go to the HTML source, find out that the software used is named “Discourse” and google how to avoid it interpreting code with some wrong language:

This is not code but just text

vs.

This is not code but just text

Hi @h.lenz

You need to specify the language for correct syntax highlighting.

```cpp

This is highlighted like C++ code

```

vs

```python

This is highlighted like Python code

```

With no language given, this version of markdown may guess a language? or just highlight common keywords like “is” and “not” as seen in your example.

Cheers
Thomas

Tiny piece of additional background: Discourse uses highlight.js (highlightjs.org) for syntax highlighting. If no language tag is given, this library will try to guess the language (which with regular text output can yield funny results).

As the number of languages supported can have an impact on the render performance we have limited the usable syntax highlighting tags in this forum to

  • bash
  • cs
  • cpp
  • diff
  • xml
  • ini
  • json
  • makefile
  • markdown
  • python
  • sql
  • delphi
  • cmake
2 Likes

…and “txt” or “text” works if it should do nothing (and obviously also everything that it does not know as also “sdasdsad” works to stop guessing)