diff --git a/lib/sassc/engine.rb b/lib/sassc/engine.rb index 5b0c8032..1e040753 100644 --- a/lib/sassc/engine.rb +++ b/lib/sassc/engine.rb @@ -17,6 +17,8 @@ def initialize(template, options = {}) end def render + return @template if @template.empty? + data_context = Native.make_data_context(@template) context = Native.data_context_get_context(data_context) native_options = Native.context_get_options(context) diff --git a/test/engine_test.rb b/test/engine_test.rb index 1b325096..612a6a15 100644 --- a/test/engine_test.rb +++ b/test/engine_test.rb @@ -189,5 +189,10 @@ def test_inline_source_maps assert_match /sourceMappingURL/, output assert_match /.foo/, output end + + def test_empty_template + output = Engine.new('').render + assert_equal '', output + end end end