Skip to content

Commit

Permalink
Merge pull request #1315 from xzyfer/fix/1281
Browse files Browse the repository at this point in the history
Fix type-of function reporting color for strings
  • Loading branch information
xzyfer committed Jul 8, 2015
2 parents 27e9980 + fa3b97f commit 54707e1
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 54707e1

Please sign in to comment.