commit
f42e750f65
|
@ -270,13 +270,9 @@ END
|
|||
|
||||
# Adds +text+ to <tt>@buffer</tt> while flattening text.
|
||||
def push_flat(line)
|
||||
unless @options[:ugly]
|
||||
text = line.full.dup
|
||||
text = "" unless text.gsub!(/^#{@flat_spaces}/, '')
|
||||
@filter_buffer << "#{text}\n"
|
||||
else
|
||||
@filter_buffer << "#{line.unstripped}\n"
|
||||
end
|
||||
text = line.full.dup
|
||||
text = "" unless text.gsub!(/^#{@flat_spaces}/, '')
|
||||
@filter_buffer << "#{text}\n"
|
||||
end
|
||||
|
||||
# Causes <tt>text</tt> to be evaluated in the context of
|
||||
|
|
|
@ -500,6 +500,13 @@ SOURCE
|
|||
END
|
||||
end
|
||||
|
||||
def test_ugly_filter
|
||||
assert_equal(<<END, render(":sass\n #foo\n bar: baz", :ugly => true))
|
||||
#foo {
|
||||
bar: baz; }
|
||||
END
|
||||
end
|
||||
|
||||
def test_local_assigns_dont_modify_class
|
||||
assert_equal("bar\n", render("= foo", :locals => {:foo => 'bar'}))
|
||||
assert_equal(nil, defined?(foo))
|
||||
|
|
Loading…
Reference in New Issue