Read more

New cards feature: Explicit language declaration for syntax highlighting

Henning Koch
July 16, 2012Software engineer at makandra GmbH

Makandra cards will auto-detect the language used for syntax highlighting.

Illustration online protection

Rails Long Term Support

Rails LTS provides security patches for old versions of Ruby on Rails (2.3, 3.2, 4.2 and 5.2)

  • Prevents you from data breaches and liability risks
  • Upgrade at your own pace
  • Works with modern Rubies
Read more Show archive.org snapshot

This auto-detection sometimes fails for short code snippets. In such cases you can explicitly declare the language for Github-style code blocks:

```css
body {
  font-size: 12px
}
```

Will turn into this:

body {
  font-size: 12px
}

To disable syntax highlighting entirely use the text language:

```text
I am nothing without pretend
I know my faults
can't live with them
I am nothing without a man
I know my thoughts
but I can't hide them    
```

Result: monospaced text without highlighting.

I am nothing without pretend
I know my faults
can't live with them
I am nothing without a man
I know my thoughts
but I can't hide them    
Posted by Henning Koch to makandra dev (2012-07-16 22:58)