Class: Spirit::Render::Processors::PygmentsProcessor
- Defined in:
- lib/spirit/render/processors/pygments_processor.rb
Instance Method Summary collapse
-
#highlight_code(code, marker) ⇒ String
Pygmentizes code blocks.
Methods inherited from Base
events, inherited, #initialize, #invoke_callbacks_for, process
Constructor Details
This class inherits a constructor from Spirit::Render::Processors::Base
Instance Method Details
#highlight_code(code, marker) ⇒ String
Pygmentizes code blocks.
14 15 16 |
# File 'lib/spirit/render/processors/pygments_processor.rb', line 14 def highlight_code(code, marker) Pygments.highlight(code, lexer: marker || 'text') end |