Syntax Highlighted Code Snippet

Allows for a code snippet to be styled according to the language specified.
Source Markup
{code:c#}
using System;
public class HelloWorld
{
   public static void Main(params string[] args)
   {
   Console.WriteLine("Hello World!");
   }
}
{code:c#}

Rendered Markup
using System;
public class HelloWorld
{
   public static void Main(params string[] args)
   {
   Console.WriteLine("Hello World!");
   }
}
Syntax Highlighting Supported Languages
Using {code:language} as shown above.

Language Notes
aspx c# Use for code snippets from .aspx, .ascx, .asax, .asmx, .master, and .skin files that have embedded C# code
aspx vb.net Use for code snippets from .aspx, .ascx, .asax, .asmx, .master, and .skin files that have embedded VB.NET code
ashx Use for code snippets from .ashx files
c# Use for C# code snippets
c++ Use for C++ code snippets
vb.net Use for VB.NET code snippets
html Use for HTML code snippets
sql Use for SQL code snippets
java Use for Java code snippets
javascript Use for JavaScript code snippets
xml Use for snippets from .xml, .config, .dbml, and .xsd files
php Use for PHP code snippets
css Use for CSS code snippets
powershell Use for Powershell code snippets

Last edited Mar 12, 2010 at 4:07 PM by matthaw, version 3

Comments

draepetan Feb 4, 2013 at 10:46 PM 
This doesn't work for me. I noticed that there isn't a syntax highlighter renderer. Is that missing or am i missing something?

brantheman Dec 9, 2010 at 5:57 PM 
How do I indent a code block?