Surf Roots, Software Thoughts A blog by Alex Loddengaard

19May/080

Better Code Syntax Highlighting in WordPress

I've written previously about syntax highlighting in WordPress, but I've found a better plugin since then. Google's syntax highlighting plugin for WordPress is much better; and thank god it supports Delphi.

Here's an example:

public class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello, World!");
    }
}

Pretty shnazzy, huh? Here are the usage instructions and language support.

I had to make one minor change to one of their CSS files. I changed Styles/SyntaxHighlighter.css such that the .dp-highlighter .bar definition had a smaller left padding. Take a look:

.dp-highlighter .bar {
    padding-left: 30px;
}

Enjoy!

Filed under: WordPress Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment


No trackbacks yet.