Class: Formol::Formatters::Redcarpet::SyntaxHighlighter

Inherits:
Redcarpet::Render::XHTML
  • Object
show all
Defined in:
lib/formol/formatters/redcarpet/syntax_highlighter.rb

Instance Method Summary collapse

Instance Method Details

#block_code(code, language) ⇒ Object



8
9
10
11
12
13
# File 'lib/formol/formatters/redcarpet/syntax_highlighter.rb', line 8

def block_code(code, language)
   title_block(language) + Pygments.highlight(code, :lexer    => language,
                                                    :options  => {
                                                      :linenos  => 'inline'
                                                    })
end