I'm using blogger for some month now but was still looking for an easy way to post code snippets. Of course,
I'm not the only one looking for such a feature. It's somehow amazing that blogger doesn't offer better support for this.
But tonight, I discovered Alex Gorbatchev's
SyntaxHighligher which seems to be what I was looking for. I googled a bit more and found this
HOWTO: post code (thanks
gPowered.net). A few minutes later, the SyntaxHighlighter library was uploaded and my blogger template updated to enable it.
Let's try it now with a classical HelloWorld sample :
/**
* The HelloWorld class is an application that
* displays "Hello World!" to the standard output.
*/
public class HelloWorld {
// Display "Hello World!"
public static void main(String args[]) {
System.out.println("Hello World!");
}
}
So, how does it looks like ?
Oh, by the way, Thomas Walloschke created a neat
extension for Apache configuration files. Nice. I might use his "brush" too.