Posting syntax highlighted source code to Wordpress

less than 1 minute read

So I almost left Wordpress the other day, when I found the code tags didn’t syntax hightlight. Since then I’ve found this page: http://en.support.wordpress.com/code/posting-source-code/ which describes how to do it with sourcecode tags.

I’m not sure why it was so hard to find, but Wordpress has a big thing about blocking Javascript, so searching for “syntax highlighting javascript on wordpress” provided suitably incorrect results. The highlighting options look pretty comprehensive, and although the highlighting of dojo code isn’t quite spot on (I haven’t found an editor that is, TextMate is about as close as I’ve got), it is certainly more readable than the ‘pre’ tags.

Tags:

Updated: