Skip to content

Commit

Permalink
Fixing child selector repetition
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric Kimn authored and mgreter committed Jul 13, 2015
1 parent 38d356e commit 4767390
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions eval.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1453,9 +1453,14 @@ namespace Sass {
if (s->tail()) {
Selector_List* tails = operator()(s->tail());
for (size_t m = 0, mL = tails->length(); m < mL; ++m) {
Complex_Selector* ss = new (ctx.mem) Complex_Selector(*s);
ss->tail((*tails)[m]);
*sl << ss;
Complex_Selector* tailm = (*tails)[m];
if(head && head->is_superselector_of(tailm)) {
*sl << s;
} else {
Complex_Selector *ss = new(ctx.mem) Complex_Selector(*s);
ss->tail(tailm);
*sl << ss;
}
}
}
else {
Expand Down

0 comments on commit 4767390

Please sign in to comment.