Github Wiki - Source code syntax highlighting

Maverik picture Maverik · Jul 16, 2012 · Viewed 7.3k times · Source

how can I write some code in my project github wiki and highlight the syntax?

In MoinMoin wiki I'm used to do

{{{#!highlight cpp
my code
}}}

and it work's great.

Any suggestion for github wiki? Thanks in advance

Answer

Pafjo picture Pafjo · Jul 16, 2012

You use "```"
Example for ruby:

```ruby
code and stuff
```