Class: HTMLwithPygments
- Inherits:
-
Redcarpet::Render::HTML
- Object
- Redcarpet::Render::HTML
- HTMLwithPygments
- Defined in:
- lib/tocmd/translator_trans.rb
Instance Method Summary collapse
Instance Method Details
#block_code(code, language) ⇒ Object
367 368 369 |
# File 'lib/tocmd/translator_trans.rb', line 367 def block_code(code, language) Pygments.highlight(code, :lexer => language, :options => {:encoding => 'utf-8'}) end |
#doc_header ⇒ Object
363 364 365 |
# File 'lib/tocmd/translator_trans.rb', line 363 def doc_header() '<style>' + Pygments.css('.highlight',:style => 'friendly') + '</style>' end |