Syntax highlighting

In card description and comments you can tell TCO to use syntax highlighting for code blocks enclosed by ```.
To use it, specify the code language on the first line followed by a colon:, like this:

... your code here ...↵

The following language codes are available:

  • asp
  • c, c#, c++
  • css
  • cssless
  • html
  • htmlmixed
  • htmlphp
  • java
  • javascript
  • json
  • jsp
  • mariadb
  • mssql
  • mysql
  • objectivec
  • pearl
  • pgsql
  • php
  • plainhtml
  • plsql
  • python
  • ruby
  • sql
  • typescript
  • vb
  • xcss
  • xml
Trello syntax highlighting
Multiple blocks with syntax highlighting are supported in both description and comments

Don’t forget the colon after the language code!
After the colon you can use the options ‘linenumbers’ and or ‘wraptext’.
So to use syntax highlighting for sql with linenumbers and wrapped lines, use the following code block:

... your code here ...↵

If you don’t specify any options, linenumbers and wraptext are default off.
Be aware that wraptext can have an unwanted dynamic resizing effects during vertical scrolling.

Code blocks with syntax highlighting are set to a maximum height of 500px, and will show a vertical scrollbar if the code has too many lines to fit in that space.
The code block will also show a horizontal scrollbar if you haven’t specified ‘wraptext’ and lines don’t fit (which will not happen if wraptext is specified).

Note: Syntax highlighting is a processor intensive process.
Using a lot of code blocks in the description and/or the comments of a card can cause slight delays.

How useful was this information?

Click on a star to rate it

Average rating 5 / 5. Vote count: 1

No votes so far, be the first to rate this!

Let me know why this was not useful for you!

(NOT FOR QUESTIONS, use the Blog instead)

Tell me how I can improve this?