Easy Syntax Highlighting Helper
November 1st, 2008
sudo gem install uv
(read this if you're having trouble)
def highlight(options = {:format =>"ruby"}, &block)
Uv.parse( yield, "xhtml", options[:format], false, "twilight")
end
Which gives you:
<% highlight do %>
class Person < ActiveRecord::Base
end
<% end %>
Here's the CSS for the 'twilight' theme.
Oh and I do realise the irony of posting code about syntax highlighting with no highlighting...
References:
1 Response to “Easy Syntax Highlighting Helper”
Sorry, comments are closed for this article.

November 2nd, 2008 at 06:16 PM
Very usefull plugin! Thank you Steve!