You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
24 lines
404 B
24 lines
404 B
module Jekyll
|
|
require 'haml'
|
|
class HamlConverter < Converter
|
|
safe true
|
|
priority :low
|
|
|
|
def matches(ext)
|
|
ext =~ /haml/i
|
|
end
|
|
|
|
def output_ext(ext)
|
|
".html"
|
|
end
|
|
|
|
def convert(content)
|
|
begin
|
|
engine = Haml::Engine.new(content)
|
|
engine.render
|
|
rescue StandardError => e
|
|
puts "!!! HAML Error: " + e.message
|
|
end
|
|
end
|
|
end
|
|
end
|
|
|