Method: OMF::Web::Widget::Code::CodeWidget#render_code
- Defined in:
- lib/omf-web/widget/UNUSED/code/code_widget.rb
#render_code ⇒ Object
32 33 34 35 36 37 38 39 40 41 42 43 44 45 |
# File 'lib/omf-web/widget/UNUSED/code/code_widget.rb', line 32 def render_code() content = file_content type = code_type mimeType = @@codeType2mime[type] #puts ">>>>RENDER_CODE>> #{content.length}" begin tokens = CodeRay.scan content, type tokens.html :line_numbers => :inline, :tab_width => 2, :wrap => :div rescue Exception => ex puts ">>>> ERORRO: #{ex} #{ex.backtrace}" end #puts "<<<<< END OF RENDER CODE #{tokens.inspect}" end |