Skip to content

Commit

Permalink
Merge pull request #147 from toge/workaround-inner-selector
Browse files Browse the repository at this point in the history
rename inner selector in seletor to subselector
  • Loading branch information
sammycage committed Dec 24, 2023
2 parents 940b96e + dc3d4ba commit ef62fac
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1226,8 +1226,8 @@ bool RuleData::matchPseudoClassSelector(const PseudoClassSelector& selector, con
return element->parent == nullptr;

if(selector.type == PseudoClassSelector::Type::Is) {
for(auto& selector : selector.subSelectors) {
for(auto& sel : selector) {
for(auto& subselector : selector.subSelectors) {
for(auto& sel : subselector) {
if(!matchSimpleSelector(sel, element)) {
return false;
}
Expand All @@ -1238,8 +1238,8 @@ bool RuleData::matchPseudoClassSelector(const PseudoClassSelector& selector, con
}

if(selector.type == PseudoClassSelector::Type::Not) {
for(auto& selector : selector.subSelectors) {
for(auto& sel : selector) {
for(auto& subselector : selector.subSelectors) {
for(auto& sel : subselector) {
if(matchSimpleSelector(sel, element)) {
return false;
}
Expand Down

0 comments on commit ef62fac

Please sign in to comment.