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
You can also create a Markdown hyperlink by highlighting the text and using the keyboard shortcut Command + V .
We use Linguist to perform language detection and to select third-party grammars for syntax highlighting.
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.
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.
You use "```"
Example for ruby:
```ruby
code and stuff
```
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With