leafo/scssphp — pull request #113 by oscherler (2013-08-25 12:29:14+00:00)
Title: Fix for @extend infinite loop.

In Twitter Bootstrap 3.0.0 converted to SASS ([jlong/sass-bootstrap](https://github.com/jlong/sass-bootstrap/)), the following case in `_navs.scss` (reduced to minimum failing example) causes an infinite loop to occur at compilation in scssphp:

.nav-tabs {
&.nav-justified {
@extend .nav-justified;
}
}

.nav-justified {
text-align: justify;
}

The reason is that the `&.nav-justified` that contains the extend is used as its own target.

This pull request adds:
* a test case demonstrating the problem (I wanted to add it to the end of extends.scss, but it caused extra spaces to appear in the output, so I moved it);
* a lucky guess fix that is probably not the right way to correct the problem (I didn’t understand all the underpinnings of the `@extend` processing mechanism) but doesn’t break any tests.