Fix some operator output in to_sass.

This commit is contained in:
Chris Eppstein 2010-01-28 09:43:27 -08:00
parent b9af766886
commit 6b4290472c

View File

@ -54,7 +54,7 @@ module Sass
class CommentNode < Node
def to_sass
comment = silent ? "//" : "/*"
comment << value
comment << " " << value
lines.each do |line|
comment << " " << line
end
@ -207,7 +207,7 @@ module Sass
:plus => ' + ',
:minus => ' - ',
:div => ' / ',
:mult => '*',
:times => ' * ',
:comma => ', ',
:concat => ' ',
:neq => ' ! =',
@ -233,8 +233,13 @@ module Sass
end
end
class UnaryOperation < Node
OPERATORS_TO_SASS = {
:minus => "-",
:div => "/",
:not => "not "
}
def to_sass(format = :text)
"#{@operator}#{@operand}"
"#{OPERATORS_TO_SASS[@operator]}#{@operand.to_sass}"
end
end
class Variable < Node