Markdown
Syntax highlighting
- For some Markdown parser e.g. GitHub Markdown, they support syntax highlight in code block.
- Therefore, you can add a language identifier to code block to enable syntax highlight.
- For example, to syntax highlight Ruby code:
```rubyrequire 'redcarpet'markdown = Redcarpet.new("Hello World!")puts markdown.to_html```
- Find more supported language identifiers. https://github.com/github/linguist/blob/master/lib/linguist/languages.yml and use
ace_mode
key
Syntax highlight in .NET Thailand website
- For C#, please use
cs
,csharp
ordotnet
. REF - For example:
```cs// Hello World! program// Program.cs fileusing System;namespace HelloWorld{public class Program{public static void Main(string[] args){Console.WriteLine("Hello World!");}}}```
Useful links
Loading comments...