File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -1010,6 +1010,16 @@ namespace Sass {
1010
1010
{
1011
1011
To_String to_string (&ctx);
1012
1012
Expression* key = parse_list ();
1013
+ if (String_Quoted* str = dynamic_cast <String_Quoted*>(key)) {
1014
+ if (!str->quote_mark () && !str->is_delayed ()) {
1015
+ if (ctx.names_to_colors .count (str->value ())) {
1016
+ Color* c = new (ctx.mem ) Color (*ctx.names_to_colors [str->value ()]);
1017
+ c->pstate (str->pstate ());
1018
+ c->disp (str->value ());
1019
+ key = c;
1020
+ }
1021
+ }
1022
+ }
1013
1023
1014
1024
// it's not a map so return the lexed value as a list value
1015
1025
if (!peek< exactly<' :' > >())
@@ -1029,6 +1039,16 @@ namespace Sass {
1029
1039
{ break ; }
1030
1040
1031
1041
Expression* key = parse_list ();
1042
+ if (String_Quoted* str = dynamic_cast <String_Quoted*>(key)) {
1043
+ if (!str->quote_mark () && !str->is_delayed ()) {
1044
+ if (ctx.names_to_colors .count (str->value ())) {
1045
+ Color* c = new (ctx.mem ) Color (*ctx.names_to_colors [str->value ()]);
1046
+ c->pstate (str->pstate ());
1047
+ c->disp (str->value ());
1048
+ key = c;
1049
+ }
1050
+ }
1051
+ }
1032
1052
1033
1053
if (!(lex< exactly<' :' > >()))
1034
1054
{ error (" invalid syntax" , pstate); }
You can’t perform that action at this time.
0 commit comments