Close
AlgoliaLogoLight
Close full mode
logo

Markdown

Git RepositoryEdit on Github

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:
```ruby
require 'redcarpet'
markdown = Redcarpet.new("Hello World!")
puts markdown.to_html
```

Syntax highlight in .NET Thailand website

  • For C#, please use cs, csharp or dotnet. REF
  • For example:
```cs
// Hello World! program
// Program.cs file
using System;
namespace HelloWorld
{
public class Program
{
public static void Main(string[] args)
{
Console.WriteLine("Hello World!");
}
}
}
```
Loading comments...