Maverik
Maverik

Reputation: 2398

Github Wiki - Source code syntax highlighting

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

Upvotes: 14

Views: 7652

Answers (1)

Pafjo
Pafjo

Reputation: 5019

You use "```"
Example for ruby:

```ruby
code and stuff
```

Upvotes: 27

Related Questions