WordPress syntax highlighting plugins suck
During last few days I have tried almost a dozen WordPress add-ons in a search for a good syntax highlighting plugin (not sure if there are any other similar plugins I haven’t tried) and I must tell you – they all suck. Choosing a WordPress syntaxt highlighting plugin is about choosing the one that sucks the least.
There are couple of reasons why most of these plugins are bad:
- Only one of them is completely standards compliant. I understand that for most people this is a nonissue (as long as it works who cares?) but I’m a web standards freak so for me this is a big no. Come on, when you are developing a WordPress plugin is it that difficult to spend an additional hour or two and make sure it is standards compliant?
- Some require already HTML entities escaped code.
- For most of them you must write your posts without the visual editor or else your code snippets will break up.
- Some use bb tags for code snippets and thus do not degrade gracefully for people with turned off JavaScript (or people who visit your site from a mobile device not supporting JavaScript).
- Numerous small but annoying bugs. For example, in one plugin you have to add an additional new line at the beginning of a code snippet or else the first line will be commented.
- Very dull out of the box styling. I know I can edit stylesheets but it would be nice to have a pretty balanced colors out of the box for those of us who don’t have time to fiddle with the plugin.
- Not compatible with a newest WordPress release.
All plugins I have tried suffer from at least one of the issues. I’m not saying they are completely worthless. They will do the job and highlight the code syntax for you but plugins should make your life easier – having to edit my posts in the plain HTML editor or having to escape code snippets is a nuisance and not a small one.
For now, I am using the Highlight Source Pro because it is one of few that outputs a valid XHTML markup. Unfortunately, I still have to edit my posts in the HTML editor. Frankly, it isn’t the best solution but I haven’t found anything better.
