Class: HtmlWithPygments

Inherits:
Redcarpet::Render::HTML
  • Object
show all
Defined in:
lib/markdown-scaffold/templates/html_with_pygments.rb

Instance Method Summary collapse

Instance Method Details

#block_code(code, language) ⇒ Object

————# block_code # ————# コードハイライト



8
9
10
# File 'lib/markdown-scaffold/templates/html_with_pygments.rb', line 8

def block_code( code, language )
  Pygments.highlight( code, lexer: language, options: { encoding: 'utf-8' } )
end