Class: Scarlet::Formatters::HTML
- Inherits:
-
Object
- Object
- Scarlet::Formatters::HTML
- Includes:
- Base
- Defined in:
- lib/scarlet/formatters/html.rb
Instance Attribute Summary
Attributes included from Base
Class Method Summary collapse
Instance Method Summary collapse
Methods included from Base
Class Method Details
.default_template ⇒ Object
15 16 17 |
# File 'lib/scarlet/formatters/html.rb', line 15 def self.default_template File.join(File.dirname(__FILE__), "..", "templates", "html", "default.erb") end |
Instance Method Details
#text ⇒ Object
7 8 9 10 11 12 13 |
# File 'lib/scarlet/formatters/html.rb', line 7 def text process_code do |code, language, before, after| "#{before}<notextile><div class=\"code\">" + Scarlet::Highlighter.run(code, :format => "html", :lexer => language) + "</div></notextile>#{after}" end RedCloth.new(.text).to_html end |