Skip to content
This repository has been archived by the owner on Dec 24, 2020. It is now read-only.

Commit

Permalink
Cleaned up jpdutoit's function patch
Browse files Browse the repository at this point in the history
  • Loading branch information
soffes committed Dec 2, 2009
1 parent de57893 commit 2aea6bb
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/less/engine/nodes/function.rb
Expand Up @@ -80,7 +80,12 @@ def evaluate context = nil
if Functions.available.include? self.to_sym
send to_sym, *@args
else
Node::Anonymous.new("#{to_sym}(#{@args.map{|e| e.parent = self.parent; (e.respond_to?(:evaluate) ? e.evaluate(context) : e).to_css } * ', '})")
args = @args.map { |e|
e.parent = self.parent
e = e.evaluate(context) if e.respond_to?(:evaluate)
e.to_css
} * ', '
Node::Anonymous.new("#{to_sym}(#{args})")
end
end
end
Expand Down

0 comments on commit 2aea6bb

Please sign in to comment.