@@ -626,7 +626,7 @@ namespace Sass {
626
626
627
627
for (sass::vector<SelectorComponentObj>& components : weaved) {
628
628
629
- ComplexSelectorObj cplx = SASS_MEMORY_NEW (ComplexSelector, " [phony] " );
629
+ ComplexSelectorObj cplx = SASS_MEMORY_NEW (ComplexSelector, complex-> pstate () );
630
630
cplx->hasPreLineFeed (complex->hasPreLineFeed ());
631
631
for (auto & pp : path) {
632
632
if (pp->hasPreLineFeed ()) {
@@ -643,7 +643,18 @@ namespace Sass {
643
643
}
644
644
first = false ;
645
645
646
- result.push_back (cplx);
646
+ auto it = result.begin ();
647
+ while (it != result.end ()) {
648
+ if (ObjEqualityFn (*it, cplx)) break ;
649
+ it += 1 ;
650
+ }
651
+ if (it == result.end ()) {
652
+ result.push_back (cplx);
653
+ }
654
+
655
+ if (result.size () > 500 ) {
656
+ throw Exception::EndlessExtendError (traces, complex);
657
+ }
647
658
648
659
}
649
660
@@ -838,7 +849,7 @@ namespace Sass {
838
849
}
839
850
if (!originals.empty ()) {
840
851
CompoundSelectorObj merged =
841
- SASS_MEMORY_NEW (CompoundSelector, " [phony ]" );
852
+ SASS_MEMORY_NEW (CompoundSelector, " [compound ]" );
842
853
merged->concat (originals);
843
854
toUnify.insert (toUnify.begin (), { merged });
844
855
}
@@ -1050,7 +1061,7 @@ namespace Sass {
1050
1061
}
1051
1062
}
1052
1063
1053
- SelectorListObj list = SASS_MEMORY_NEW (SelectorList, " [phony ]" );
1064
+ SelectorListObj list = SASS_MEMORY_NEW (SelectorList, " [pseudo ]" );
1054
1065
list->concat (expanded);
1055
1066
return { pseudo->withSelector (list) };
1056
1067
0 commit comments