I’ve just added support for the syntax highlight using the very good project SyntaxHighlighter.

I used the WordPress plugin Google Syntax Highlighter for WordPress but not without pain.

Indeed there is a CSS conflict between SyntaxHighlighter and Wordpress at the list level that makes the highlighted code to be displayed with additional margins. If you want to see what I mean, download the plugin for WordPress and look at the screenshot. The plugin on my blog is fixed.

So now the fix: modify the file Styles/SyntaxHighlighter.css in the plugin (which originally comes from the SyntaxHighlighter project). Add the following at the bottom:

html > body .entry div.dp-highlighter li {
  margin:0px 0pt 0px 0px;

blog comments powered by Disqus


14 August 2008