Class: Jekyll::Haml::Parser
- Inherits:
-
Object
- Object
- Jekyll::Haml::Parser
- Defined in:
- lib/jekyll/haml/markup/parser.rb
Instance Method Summary collapse
- #convert(content) ⇒ Object
-
#initialize(config) ⇒ Parser
constructor
A new instance of Parser.
- #setup ⇒ Object
Constructor Details
Instance Method Details
#convert(content) ⇒ Object
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/jekyll/haml/markup/parser.rb', line 19 def convert(content) document = ::Haml::Engine.new(content, @config) html_output = document.render.split("\n").join if @config["show_warnings"] document.warnings.each do |warning| Jekyll.logger.warn "Haml warning:", warning end end html_output end |
#setup ⇒ Object
15 16 17 |
# File 'lib/jekyll/haml/markup/parser.rb', line 15 def setup make_accessible end |