Closed cyberalien closed 5 years ago
Actually there is a small difference in output with Ruby that I missed.
In second selectors list Ruby parser doesn't include .baz.bar:before:hover
, though I think it should. First extend on .bar
should add :hover:after
to it with blue color, second extend should make it available in :before
, so blue color should be in .bar:hover:before
and third extend should make it available as .baz.bar:before:hover
.
Since sass code is invalid and causing infinite loop, looks like its caused by difference in handling bad code.
Checked this patch, it's OK, fixing the bug and, tests are OK and PSR2 OK
Some temporary breakage from conflicting PRs. I'll commit the fixes shortly.
Fix for issue https://github.com/leafo/scssphp/issues/634
Compiler was duplicating selectors, resulting in ".foo.bar.bar.bar.bar" that ended up failing at comparison, so compiler assumed it was new selector. Whole thing ended up in infinite loop.
Added code that prevents duplicates and a test case.
Output matches Ruby version, except that Ruby additionally shows a deprecation notice: