Skip to content

Commit

Permalink
improved autoconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
jakopako committed Feb 9, 2025
1 parent beeabba commit d7fe66a
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions autoconfig/autoconfig.go
Original file line number Diff line number Diff line change
Expand Up @@ -402,13 +402,22 @@ func checkAndUpdateLocProps(old, new *locationProps) bool {
continue
}
ovClasses := utils.IntersectionSlices(on.classes, new.path[i].classes)
// if nodes have more than 0 classes there has to be at least 1 overlapping class
// does this make sense?
if len(ovClasses) > 0 {
newNode.classes = ovClasses
newPath = append(newPath, newNode)
continue
if i > old.iStrip {
// if we're past iStrip we only consider nodes equal if they have the same classes
if len(ovClasses) == len(on.classes) {
newNode.classes = on.classes
newPath = append(newPath, newNode)
continue
}
} else {
// if nodes have more than 0 classes and we're not past iStrip there has to be at least 1 overlapping class
newNode.classes = ovClasses
newPath = append(newPath, newNode)
continue
}
}
// }
}
}
return false
Expand Down

0 comments on commit d7fe66a

Please sign in to comment.