"Copy for Forum (Markdown)" adds a "cpp" after the opening backticks

This is the subset of languages supported by the forum's configuration (the Discourse forum framework supports more, but they recommend only enabling the ones you are likely to use for performance reasons):

  • arduino
  • armasm
  • avrasm
  • bash
  • c
  • cpp
  • css
  • diff
  • go
  • http
  • java
  • javascript
  • json
  • makefile
  • markdown
  • plaintext
  • powershell
  • python
  • python-repl
  • shell
  • sql
  • typescript
  • xml
  • yaml

In addition to the primary identifiers listed above, you can also use aliases as identifiers for some of these languages, which are documented under the "Aliases" column here:

(Highlight.js is the package Discourse uses for syntax highlighting)

For example, I like to use text instead of plaintext to disable highlighting in code blocks that contain non-code content such as compiler output.