public
Description: A Rails plugin that provides helpers to highlight code with pretty TextMate-style highlighting.
Homepage: http://www.asemanfar.com/Rails-Plugin:-TextMate-Syntax-Highlighting
Clone URL: git://github.com/arya/tm_syntax_highlighting.git
100644 10 lines (6 sloc) 0.3 kb
1
2
3
4
5
6
7
8
9
10
require 'rubygems'
require 'uv'
 
# takes about a second to this, if we don't do it now, then the first call to highlight will take a little longer
Uv.init_syntaxes
 
ActionView::Base.send(:include, TmSyntaxHighlighting::Helper)
ActionController::Base.send(:extend, TmSyntaxHighlighting::Controller)