Skip to content

Commit

Permalink
sass#548 Fixed the interpolation~!
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Kimn committed Mar 17, 2015
1 parent ef73c1b commit 776e997
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 5 additions & 0 deletions eval.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,11 @@ namespace Sass {
Expression* ex = operator()(var);
return evacuate_quotes(interpolation(ex));

} else if (Parent_Selector* var = dynamic_cast<Parent_Selector*>(s)) {

Expression* ex = operator()(var);
return evacuate_quotes(interpolation(ex));

} else {

To_String to_string(&ctx);
Expand Down
5 changes: 3 additions & 2 deletions expand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -218,12 +218,13 @@ namespace Sass {
Statement* Expand::operator()(Assignment* a)
{
string var(a->variable());
Selector* p = selector_stack.size() >= 1 ? 0 : selector_stack.back();
if (env->has(var)) {
Expression* v = static_cast<Expression*>((*env)[var]);
if (!a->is_guarded() || v->concrete_type() == Expression::NULL_VAL) (*env)[var] = a->value()->perform(eval->with(selector_stack.back(), env, backtrace));
if (!a->is_guarded() || v->concrete_type() == Expression::NULL_VAL) (*env)[var] = a->value()->perform(eval->with(p, env, backtrace));
}
else {
env->current_frame()[var] = a->value()->perform(eval->with(selector_stack.back(), env, backtrace));
env->current_frame()[var] = a->value()->perform(eval->with(p, env, backtrace));
}
return 0;
}
Expand Down

0 comments on commit 776e997

Please sign in to comment.