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 book lover

Growing Rails Applications in Practice

Check out our e-book. Learn to structure large Ruby on Rails codebases with the tools you already know and love.

  • Introduce design conventions for controllers and user-facing models
  • Create a system for growth
  • Build applications to last
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)