Class: CnblogRender

Inherits:
Redcarpet::Render::HTML
  • Object
show all
Defined in:
lib/md2cnblog/cnblog_translator.rb

Instance Method Summary collapse

Instance Method Details

#block_code(code, lang) ⇒ Object



3
4
5
6
7
# File 'lib/md2cnblog/cnblog_translator.rb', line 3

def block_code(code, lang)
  tail = 'gutter:false;'
  class_name = (lang.nil?)? '' : "brush:#{lang};"
  %Q[<pre class="#{class_name}#{tail}">#{code}</pre>]
end