Commit 15d72416 by Aaron Leung

Cloning the color nodes that are fetched from the name-to-color conversion…

Cloning the color nodes that are fetched from the name-to-color conversion table, so that we can put in the right filename and line number.
parent 08ddfeb8
......@@ -353,7 +353,16 @@ namespace Sass {
string id_str(expr.to_string());
to_lowercase(id_str);
if (!function_name && ctx.color_names_to_values.count(id_str)) {
return ctx.color_names_to_values[id_str];
Node color_orig(ctx.color_names_to_values[id_str]);
Node r(color_orig[0]);
Node g(color_orig[1]);
Node b(color_orig[2]);
Node a(color_orig[3]);
return new_Node(expr.path(), expr.line(),
r.numeric_value(),
g.numeric_value(),
b.numeric_value(),
a.numeric_value());
}
else {
return expr;
......
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