Code syntax highlighting in BlogEngine.Net

Written by Sam McGeown
Published on 12/5/2008 - Read in about 1 min (80 words)

I’ve just added some code syntax highlighting to this blog using SyntaxHighlighter and a great how-to article by Scott Dougherty this means that any code I post should look like this:

public static string SayHello(string name){    return String.Format("Hello, {0}!", name);}

There are a few bugs at the moment, one being that tiny_mce is stripping linebreaks from the code posting (just a minor one) and the theme somehow removes the line numbers, but I’m sure I’ll find a way around them…somehow.

Share this post