Skip to content

Commit

Permalink
Fix type-of function reporting color for strings
Browse files Browse the repository at this point in the history
Fixes #1281
  • Loading branch information
mgreter authored and xzyfer committed Jul 8, 2015
1 parent 27e9980 commit fa3b97f
Showing 1 changed file with 2 additions and 5 deletions.
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

0 comments on commit fa3b97f

Please sign in to comment.