Commit da5a9c59 by Aaron Leung

Making 'image-url' work for more dynamic arguments.

parent d5012b2d
...@@ -298,10 +298,10 @@ namespace Sass { ...@@ -298,10 +298,10 @@ namespace Sass {
Node base(eval(expr[0], prefix, env, f_env, new_Node, ctx)); Node base(eval(expr[0], prefix, env, f_env, new_Node, ctx));
Node prefix(new_Node(Node::identifier, base.path(), base.line(), Token::make(ctx.image_path))); Node prefix(new_Node(Node::identifier, base.path(), base.line(), Token::make(ctx.image_path)));
Node fullpath(new_Node(Node::concatenation, base.path(), base.line(), 2)); Node fullpath(new_Node(Node::concatenation, base.path(), base.line(), 2));
Node url(new_Node(Node::uri, base.path(), base.line(), 1));
fullpath << prefix << base; fullpath << prefix << base;
url << fullpath; expr.pop_back();
return url; expr << fullpath;
return expr;
} break; } break;
case Node::function_call: { case Node::function_call: {
......
...@@ -278,6 +278,15 @@ namespace Sass { ...@@ -278,6 +278,15 @@ namespace Sass {
return result; return result;
} break; } break;
case image_url: {
Node fullpath(at(0));
string result("url(\"");
result += fullpath[0].unquote();
result += fullpath[1].unquote();
result += "\")";
return result;
} break;
case expansion: { case expansion: {
// ignore it // ignore it
return ""; return "";
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment