diff --git a/lib/hamlit/filters.rb b/lib/hamlit/filters.rb index 0c09d080..98c20c04 100644 --- a/lib/hamlit/filters.rb +++ b/lib/hamlit/filters.rb @@ -10,6 +10,7 @@ require 'hamlit/filters/markdown' require 'hamlit/filters/plain' require 'hamlit/filters/preserve' require 'hamlit/filters/ruby' +require 'hamlit/filters/sass' require 'hamlit/filters/scss' module Hamlit @@ -37,6 +38,7 @@ module Hamlit register :plain, Plain register :preserve, Preserve register :ruby, Ruby + register :sass, Sass register :scss, Scss def initialize(options = {}) diff --git a/lib/hamlit/filters/sass.rb b/lib/hamlit/filters/sass.rb new file mode 100644 index 00000000..3eb43e86 --- /dev/null +++ b/lib/hamlit/filters/sass.rb @@ -0,0 +1,14 @@ +module Hamlit + class Filters + class Sass < TiltBase + def compile(node) + require 'tilt/sass' + temple = [:multi] + temple << [:static, "".freeze] + temple + end + end + end +end diff --git a/test/hamlit/filters/sass_test.rb b/test/hamlit/filters/sass_test.rb index c82bc401..53fd81c5 100644 --- a/test/hamlit/filters/sass_test.rb +++ b/test/hamlit/filters/sass_test.rb @@ -3,7 +3,6 @@ describe Hamlit::Filters do describe '#compile' do it 'renders sass filter' do - skip assert_render(<<-HAML, <<-HTML) :sass .users_controller @@ -20,7 +19,6 @@ describe Hamlit::Filters do end it 'renders sass filter with string interpolation' do - skip assert_render(<<-'HAML', <<-HTML) :sass .users_controller