Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 484
Maverik Avatar asked Jul 16 '12 13:07

Maverik


People also ask

How do I highlight text in GitHub?

You can also create a Markdown hyperlink by highlighting the text and using the keyboard shortcut Command + V .

What does GitHub use for syntax highlighting?

We use Linguist to perform language detection and to select third-party grammars for syntax highlighting.

How do you highlight code in Markdown?

To highlight code, write the name of the language the code is written in after the initial triple backticks. In the above example, the code is written in JavaScript, and hence javascript is added after triple backticks.

How do you underline in GitHub Markdown?

Just use the HTML <u> tag (recommended) or the <ins> tag inside your markdown for this. The HTML tag <ins> is the HTML "insert tag", and is usually displayed as underlined.


1 Answers

You use "```"
Example for ruby:

```ruby
code and stuff
```
like image 76
Pafjo Avatar answered Sep 28 '22 10:09

Pafjo