Class: Redcarpet::Render::HTMLWithPygments
- Inherits:
-
HTML
- Object
- HTML
- Redcarpet::Render::HTMLWithPygments
- Defined in:
- lib/blogit/renderers/html_with_pygments.rb
Overview
Create a custom renderer that allows highlighting of code blocks
Instance Method Summary collapse
Instance Method Details
#block_code(code, language) ⇒ Object
5 6 7 |
# File 'lib/blogit/renderers/html_with_pygments.rb', line 5 def block_code(code, language) Pygments.highlight(code, lexer: language) end |