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
312 313 314 |
# File 'lib/tocmd/translator_trans.rb', line 312 def block_code(code, language) Pygments.highlight(code, :lexer => language, :options => {:encoding => 'utf-8'}) end |
#doc_header ⇒ Object
308 309 310 |
# File 'lib/tocmd/translator_trans.rb', line 308 def doc_header() '<style>' + Pygments.css('.highlight',:style => 'friendly') + '</style>' end |