@@ -228,8 +228,8 @@ namespace Sass {
228
228
// EO registerSelector
229
229
230
230
// ##########################################################################
231
- // Returns an extension that combines [left] and [right]. Throws
232
- // a [SassException] if [left] and [right] have incompatible
231
+ // Returns an extension that combines [left] and [right]. Throws
232
+ // a [SassException] if [left] and [right] have incompatible
233
233
// media contexts. Throws an [ArgumentError] if [left]
234
234
// and [right] don't have the same extender and target.
235
235
// ##########################################################################
@@ -281,7 +281,7 @@ namespace Sass {
281
281
// ##########################################################################
282
282
// Adds an extension to this extender. The [extender] is the selector for the
283
283
// style rule in which the extension is defined, and [target] is the selector
284
- // passed to `@extend`. The [extend] provides the extend span and indicates
284
+ // passed to `@extend`. The [extend] provides the extend span and indicates
285
285
// whether the extension is optional. The [mediaContext] defines the media query
286
286
// context in which the extension is defined. It can only extend selectors
287
287
// within the same context. A `null` context indicates no media queries.
@@ -353,7 +353,7 @@ namespace Sass {
353
353
354
354
ExtSelExtMap newExtensionsByTarget;
355
355
newExtensionsByTarget.insert (std::make_pair (target, newExtensions));
356
- // ToDo: do we really need to fetch again (see top off fn)
356
+ // ToDo: do we really need to fetch again (see top off fn)
357
357
auto existingExtensions = extensionsByExtender.find (target);
358
358
if (existingExtensions != extensionsByExtender.end ()) {
359
359
if (hasExistingExtensions && !existingExtensions->second .empty ()) {
@@ -373,7 +373,7 @@ namespace Sass {
373
373
374
374
}
375
375
// EO addExtension
376
-
376
+
377
377
// ##########################################################################
378
378
// Extend [extensions] using [newExtensions].
379
379
// ##########################################################################
@@ -446,7 +446,7 @@ namespace Sass {
446
446
bool first = false , containsExtension =
447
447
ObjEqualityFn (selectors.front (), extension.extender );
448
448
for (const ComplexSelectorObj& complex : selectors) {
449
- // If the output contains the original complex
449
+ // If the output contains the original complex
450
450
// selector, there's no need to recreate it.
451
451
if (containsExtension && first) {
452
452
first = false ;
@@ -614,7 +614,7 @@ namespace Sass {
614
614
// ToDo: either change weave or paths to work with the same data?
615
615
sass::vector<sass::vector<ComplexSelectorObj>>
616
616
paths = permutate (extendedNotExpanded);
617
-
617
+
618
618
for (const sass::vector<ComplexSelectorObj>& path : paths) {
619
619
// Unpack the inner complex selector to component list
620
620
sass::vector<sass::vector<SelectorComponentObj>> _paths;
@@ -977,15 +977,15 @@ namespace Sass {
977
977
if (innerPseudo->normalized () != " matches" ) return {};
978
978
return innerPseudo->selector ()->elements ();
979
979
}
980
- else if (name == " matches" && name == " any" && name == " current" && name == " nth-child" && name == " nth-last-child" ) {
980
+ else if (name == " matches" || name == " any" || name == " current" || name == " nth-child" || name == " nth-last-child" ) {
981
981
// As above, we could theoretically support :not within :matches, but
982
982
// doing so would require this method and its callers to handle much
983
983
// more complex cases that likely aren't worth the pain.
984
984
if (innerPseudo->name () != pseudo->name ()) return {};
985
985
if (!ObjEquality ()(innerPseudo->argument (), pseudo->argument ())) return {};
986
986
return innerPseudo->selector ()->elements ();
987
987
}
988
- else if (name == " has" && name == " host" && name == " host-context" && name == " slotted" ) {
988
+ else if (name == " has" || name == " host" || name == " host-context" || name == " slotted" ) {
989
989
// We can't expand nested selectors here, because each layer adds an
990
990
// additional layer of semantics. For example, `:has(:has(img))`
991
991
// doesn't match `<div><img></div>` but `:has(img)` does.
@@ -1031,7 +1031,7 @@ namespace Sass {
1031
1031
}
1032
1032
}
1033
1033
}
1034
-
1034
+
1035
1035
sass::vector<ComplexSelectorObj> expanded = expand (
1036
1036
complexes, extendPseudoComplex, pseudo, mediaQueryContext);
1037
1037
@@ -1051,7 +1051,7 @@ namespace Sass {
1051
1051
}
1052
1052
1053
1053
SelectorListObj list = SASS_MEMORY_NEW (SelectorList, " [phony]" );
1054
- list->concat (complexes );
1054
+ list->concat (expanded );
1055
1055
return { pseudo->withSelector (list) };
1056
1056
1057
1057
}
@@ -1088,7 +1088,7 @@ namespace Sass {
1088
1088
{
1089
1089
1090
1090
// Avoid truly horrific quadratic behavior.
1091
- // TODO(nweiz): I think there may be a way to get perfect trimming
1091
+ // TODO(nweiz): I think there may be a way to get perfect trimming
1092
1092
// without going quadratic by building some sort of trie-like
1093
1093
// data structure that can be used to look up superselectors.
1094
1094
// TODO(mgreter): Check how this performs in C++ (up the limit)
@@ -1130,7 +1130,7 @@ namespace Sass {
1130
1130
maxSpecificity = std::max (maxSpecificity, maxSourceSpecificity (compound));
1131
1131
}
1132
1132
}
1133
-
1133
+
1134
1134
1135
1135
// Look in [result] rather than [selectors] for selectors after [i]. This
1136
1136
// ensures we aren't comparing against a selector that's already been trimmed,
0 commit comments