Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix type-of function reporting color for strings #1315

Merged
merged 1 commit into from
Jul 8, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions functions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,7 @@ namespace Sass {
error(msg, pstate, backtrace);
}
catch (...) { throw; }
// return something even if we had an error (-1)
// handle any invalid utf8 errors
return new (ctx.mem) Number(pstate, len);
}

Expand Down Expand Up @@ -913,7 +913,7 @@ namespace Sass {
error(msg, pstate, backtrace);
}
catch (...) { throw; }
// return something even if we had an error (-1)
// handle any invalid utf8 errors
return new (ctx.mem) Number(pstate, index);
}

Expand Down Expand Up @@ -1389,9 +1389,6 @@ namespace Sass {
if (v->concrete_type() == Expression::STRING) {
To_String to_string(&ctx);
string str(v->perform(&to_string));
if (ctx.names_to_colors.count(str)) {
return new (ctx.mem) String_Constant(pstate, "color");
}
}
return new (ctx.mem) String_Constant(pstate, ARG("$value", Expression)->type());
}
Expand Down