Syntax highlight support

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;
}

2 Responses to “Syntax highlight support”

  1. SeanJA Says:

    I had some problems with that plugin a while ago, I just chose a different one.

  2. Julien Viet Says:

    @SeanJa

    which one did you use ? is it also based on the SyntaxHighlighter project ?