I wanted to post a diff earlier today so I started by looking for a WordPress plugin that would integrate a syntax highlighter, I quickly found in the form of WP-Syntax which utilizes GeSHi (a server side syntax highlighter). However, turns out the default Hybrid theme applies an ugly background image to any pre tags.
I didn’t stop to try and figure out what The One True Way (TM) was so I just edited the relevant CSS files directly. The files I changed were wp-content/themes/hybrid/library/css/screen.css (to remove background) and wp-content/plugins/wp-syntax/wp-syntax.css (to change the wrapping to pre-wrap).
For a lot of WP-Syntax examples take a look at the Emacs Blog.
TODO:
- Turns out the correct way to modify wp-syntax.css was described in the notes section of the WP-Syntax plugin page:
To customize your styling, copy the default wp-content/plugins/wp-syntax/wp-syntax.css to your theme’s template directory and modify it. If a file named wp-syntax.css exists in your theme’s template directory, this stylesheet is used instead of the default.
- Seems the border is a bit buggy.