Sha256: 070ac885f0c5e89065ab6458384a412794576755aaccb04850c3a763243d8dac
Contents?: true
Size: 467 Bytes
Versions: 6
Compression:
Stored size: 467 Bytes
Contents
# this file is not require'd from the root. To use this plugin, run: # # require 'rouge/plugins/redcarpet' # this plugin depends on redcarpet require 'redcarpet' module Rouge module Plugins module Redcarpet def block_code(code, language) lexer = Lexer.find(language) || Lexers::Text formatter = Formatters::HTML.new(:css_class => "highlight #{lexer.tag}") Rouge.highlight(code, lexer, formatter) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems