From fa3b97f9891b3d940d82c83cc173be11e6fef9a3 Mon Sep 17 00:00:00 2001 From: Marcel Greter Date: Thu, 18 Jun 2015 02:23:58 +0200 Subject: [PATCH] Fix type-of function reporting color for strings Fixes https://github.com/sass/libsass/issues/1281 --- functions.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/functions.cpp b/functions.cpp index d4380880b9..e078a0feba 100644 --- a/functions.cpp +++ b/functions.cpp @@ -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); } @@ -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); } @@ -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()); }