Wednesday, August 27, 2008

Code block formatter for your blog

You may have notice that the code blocks in my blog entries are nicely formatted and have a snazzy grey box around them.
package domfarr;

public final class HelloWorld {
  public static void main(String[] args) {
    System.out.println("Hello World!");
  }
}
How do I do them you ask? A god like knowledge of JavaScript and CSS! Well, no. As any pragmatic developer does, I check to see if someone had already invented the wheel. And they have: Format My Source Code for Blogging Remember, someone is always listening. So make your code generic. We don't want your company or client getting all upset because you just posted their new encryption string.

1 comments: