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

コードハイライト



3
4
5
# File 'lib/markdown-scaffold/templates/html_with_pygments.rb', line 3

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