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 sass#1281
  • Loading branch information
mgreter committed Jun 30, 2015
1 parent 1bf5b7e commit d21495e
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 @@ -818,7 +818,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 @@ -909,7 +909,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 @@ -1379,9 +1379,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 d21495e

Please sign in to comment.