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 professionals since 2007

Our laser focus on a single technology has made us a leader in this space. Need help?

  • We build a solid first version of your product
  • We train your development team
  • We rescue your project in trouble
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)