Class: HtmlWithPygments
- Inherits:
-
Redcarpet::Render::HTML
- Object
- Redcarpet::Render::HTML
- HtmlWithPygments
- Defined in:
- lib/markdown-scaffold/templates/html_with_pygments.rb
Instance Method Summary collapse
-
#block_code(code, language) ⇒ Object
————# block_code # ————# コードハイライト.
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 |