mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
b478e91068
Previously we supported one level of nested pseudo-element selectors inside :host-context(), e.g. :host-context(:is(.foo, .bar)). This was based on a regex-based approach. We could support deeper levels of nesting by updating the regex, but using a regex approach prohibits us from supporting arbitrary nesting. Rather than just adding one more level to the existing expression, I've added a new generator function which splits selectors on commas in a parenthesis-aware way. This allows us to support arbitrary nesting. It's likely we'll want to reuse this in other places where we're not as careful today. We'll probably do this on a request-based basis, though. Fixes #59176