I noticed a little bug in the WP-Syntax plugin for WordPress – the line numbers don’t match when using code with comments, well at least in Firefox 3.5. I realized it was caused by the italics where the line-height increased by approximately 1 pixel. It’s not that bad when you have a couple of comments in the code, but 60 lines of code with around 10 lines of comments completely broke my line numbers. I figured out WP-Syntax is configurable and here’s how I removed the italics from code comments:
add_action('wp_syntax_init_geshi', 'my_custom_geshi_styles'); function my_custom_geshi_styles(&$geshi) { $geshi->set_comments_style(1, 'font-style:normal;', true); } // Note that comments are okay now ;)
Place this in your functions.php file and refresh your page. More info about the other $genshi methods could be found in the Genshi Documentation.
Social comments and analytics for this post…
This post was mentioned on Twitter by web2feed: WordPress: Customizing WP-Syntax http://bit.ly/1X56GZ…