Module: MaRuKu::Out::HTML
- Defined in:
- lib/semi-static/pygmentize.rb
Overview
:nodoc:
Instance Method Summary collapse
- #to_html_code_with_pygments ⇒ Object (also: #to_html_code)
Instance Method Details
#to_html_code_with_pygments ⇒ Object Also known as: to_html_code
46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/semi-static/pygmentize.rb', line 46 def to_html_code_with_pygments if SemiStatic::Pygmentize.enabled source = self.raw_code lang = self.attributes[:lang] || 'text' html = SemiStatic::Pygmentize.pygmentize source, lang doc = Document.new html, :respect_whitespace => :all add_ws doc.root else to_html_code_without_pygments end end |