Thursday, 13 August 2009

Posting Code in Blog Posts

It's a nightmare trying to post any code in Blog posts. The tags confuse Blogger (fair enough) so if it happens, it won't let you post the code.

I tried to install SyntaxHiglighter from Google, but it requires you to host its code on a webserver somewhere and I couldn't get it to work.

Stanley Shilov came up with a nice alternative online tool which you can paste your code into, and it will parse it and replace any characters which will confuse your blogging engine with HTML tags which it'll love. You can access the tool here, and it needs zero set up and zero hassle.

The drawback is that it doesn't offer any syntax highlighting, but it's still useful and I'll certainly be using it in future!