Thursday, December 31, 2009

SyntaxHighlighter for Blogspot

I found a rather interesting article today that shows how to enable Blogger accounts to use the SyntaxHighlighter library to be able to post source code online. This is just a simple test to see if I’ve configured everything correctly. Smile
So the code below is just a simple hello world snippet written in C#.
using System;

namespace Example
{
 public class Program
 {
  public static void Main()
  {
   Console.WriteLine("Hello World!");
  }
 }
}
Hopefully this works out OK.
Update
After several revisions of this post, the syntax highlighter is now working correctly. Turns out most of the issues were actually with the WLW plug-in that I was using to generate the source code block. When I wrote the block by hand, it worked perfectly.
Update – Take 2
I got another WLW plug-in that works a lot better. I also updated the blog template to point to the hosted version of the latest version of the SyntaxHighlighter. So far everything appears to be working well.

No comments: