Skip to content

Commit 0472f1a

Browse files
authored
Merge branch 'master' into master
2 parents 4817385 + b6bc02e commit 0472f1a

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

script/ci-build-libsass

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ then
114114
then
115115
echo "Travis rate limit on github exceeded"
116116
echo "Retrying via 'special purpose proxy'"
117-
JSON=$(curl -L -sS http://libsass.ocbnet.ch/libsass-spec-pr.psgi/$TRAVIS_PULL_REQUEST)
117+
JSON=$(curl -L -sS https://github-api-reverse-proxy.herokuapp.com/repos/sass/libsass/pulls/$TRAVIS_PULL_REQUEST)
118118
fi
119119

120120
RE_SPEC_PR="sass\/sass-spec(#|\/pull\/)([0-9]+)"

src/color_maps.cpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -607,16 +607,20 @@ namespace Sass {
607607

608608
Color_Ptr_Const name_to_color(const char* key)
609609
{
610-
auto p = names_to_colors.find(key);
611-
if (p != names_to_colors.end()) {
612-
return p->second;
613-
}
614-
return 0;
610+
return name_to_color(std::string(key));
615611
}
616612

617613
Color_Ptr_Const name_to_color(const std::string& key)
618614
{
619-
return name_to_color(key.c_str());
615+
// case insensitive lookup. See #2462
616+
std::string lower{key};
617+
std::transform(lower.begin(), lower.end(), lower.begin(), ::tolower);
618+
619+
auto p = names_to_colors.find(lower.c_str());
620+
if (p != names_to_colors.end()) {
621+
return p->second;
622+
}
623+
return 0;
620624
}
621625

622626
const char* color_to_name(const int key)

0 commit comments

Comments
 (0)