WordPress Plugin for Ruby Syntax Highlighting
SyntaxHighlighter is a WordPress plugin that provides code presentation and syntax highlighting features for your blog (if it's WordPress powered, naturally!). It supports a plethora of languages such as C, C++, C#, HTML, and PHP, as well as Ruby. On my blogs so far I've tended to use a homebrew approach with the Syntax gem, but this WordPress plugin should make it a whole lot easier in the future. If you're a WordPress powered blogger who likes to post code snippets, check it out.
January 19, 2007 at 11:11 pm
Sorry in advance that I've used a PHP example for the screenshot ;-)
January 20, 2007 at 12:49 pm
Great ! I made a test, but I've trouble with indentation : the editor remove them each time I save ! :(
Except that problem, the result is clear and pretty, and there are many languages supported.
January 21, 2007 at 6:38 pm
I've been using this plugin for Ruby, Java, and CSS examples for some time and I totally love it. In CSS mode I saw one error when I would write 'right' and it would produce 'rightright'. Other than this, I recommend this plugin. If you want to see it in action, check out this intro tutorial on reopening ruby classes here...
January 22, 2007 at 9:05 pm
Sam: The problem you are having is due to the TinyMCE editor. You should disable it in your WP Options to fix it. I have found the TinyMCE editor to insert random garbage tags anyways so you probably won't miss it.
Tom
January 24, 2007 at 3:02 am
Nice plugin, except it doesn't work, for me at least. I use WordPress with the Textile plugin and it seems that the two don't play well together. The problem that I am seeing is that Textile tries to format the text with the result being that I get strange html tags inserted into my code. Although they are oddly highlighted.
Anyone else use SyntaxHighlighter and Textile together and experience this problem?