angular/packages/compiler
Matthew Beck 9419ea348a fix(compiler): support complex selectors in :nth-child()
:nth-child() (and its siblings) support complex expressions, e.g.
`:nth-child(2n of :is(.foo, .bar))`. Previously we'd choke because of
the `:is()`. Now, we reuse the `_parenSuffix` subexpression to match
nested parentheses the same way we do for :host() and :host-context().
Note that we only support 3 levels of nesting, so a selector like
`:nth-child(n of :is(:has(:not(.foo))))` will still break.

I'll say yet again that we really should add a proper parser so we stop
getting bug reports like this :)

Fixes #64913

(cherry picked from commit 24cfd5a0ed)
2025-11-11 14:03:36 -08:00
..
design build: format md files 2025-11-06 10:10:22 -08:00
src fix(compiler): support complex selectors in :nth-child() 2025-11-11 14:03:36 -08:00
test fix(compiler): support complex selectors in :nth-child() 2025-11-11 14:03:36 -08:00
BUILD.bazel build: rename defaults2.bzl to defaults.bzl (#63384) 2025-08-25 15:45:46 -07:00
compiler.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
index.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
package.json fix(core): update min Node.js support to 20.19, 22.12, and 24.0 (#61499) 2025-05-20 14:15:13 +00:00
public_api.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00