:ugly mode shouldn't mess with filter input.
This commit is contained in:
parent
07ffc82ee4
commit
82a2571e68
|
@ -303,13 +303,9 @@ END
|
|||
|
||||
# Adds +text+ to <tt>@buffer</tt> while flattening text.
|
||||
def push_flat(line)
|
||||
unless @options[:ugly]
|
||||
tabulation = line.spaces - @flat_spaces
|
||||
tabulation = tabulation > -1 ? tabulation : 0
|
||||
@filter_buffer << "#{' ' * tabulation}#{line.unstripped}\n"
|
||||
else
|
||||
@filter_buffer << "#{line.unstripped}\n"
|
||||
end
|
||||
tabulation = line.spaces - @flat_spaces
|
||||
tabulation = tabulation > -1 ? tabulation : 0
|
||||
@filter_buffer << "#{' ' * tabulation}#{line.unstripped}\n"
|
||||
end
|
||||
|
||||
# Causes <tt>text</tt> to be evaluated in the context of
|
||||
|
|
|
@ -477,6 +477,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