angular/packages/compiler/src
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
..
expression_parser fix(compiler): recover template literals with broken expressions (#64150) 2025-09-30 16:01:50 -04:00
i18n Revert "refactor(compiler): Remove the interpolation config (#64071)" (#64110) 2025-09-26 15:16:54 -04:00
ml_parser fix(compiler): correctly compile long numeric HTML entities (#64297) 2025-10-17 18:23:45 +00:00
output refactor(compiler): implement new binary operators in output AST (#62064) 2025-06-23 14:23:29 +02:00
render3 refactor(compiler): Improve pipe in track expression error (#64321) 2025-10-13 08:59:57 -07:00
schema fix(compiler): Add support for aria-invalid (#63748) 2025-09-15 18:41:17 +00:00
template/pipeline fix(core): do not rename ARIA property bindings to attributes (#64089) 2025-09-25 14:51:13 -04:00
template_parser Revert "refactor(compiler): Remove the interpolation config (#64071)" (#64110) 2025-09-26 15:16:54 -04:00
assertions.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
chars.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
combined_visitor.ts refactor(compiler): consolidate combined recursive visitors (#61158) 2025-05-08 07:11:36 +02:00
compiler.ts refactor(compiler): replace output AST write nodes (#61682) 2025-06-03 11:08:50 -04:00
compiler_facade_interface.ts Revert "refactor(compiler): Remove the interpolation config (#64071)" (#64110) 2025-09-26 15:16:54 -04:00
config.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
constant_pool.ts refactor(compiler): replace output AST write nodes (#61682) 2025-06-03 11:08:50 -04:00
core.ts Revert "feat(platform-browser): Add IsolatedShadowDom encapsulation method (#62723)" (#63142) 2025-08-13 11:12:59 -07:00
directive_matching.ts refactor(compiler): add more information to template binder (#60977) 2025-04-24 13:02:39 -07:00
injectable_compiler_2.ts refactor(compiler): avoid duplication between FactoryTarget type (#61472) 2025-05-20 10:00:43 +00:00
jit_compiler_facade.ts Revert "refactor(compiler): Remove the interpolation config (#64071)" (#64110) 2025-09-26 15:16:54 -04:00
parse_util.ts refactor(compiler): ensure compiler passes closure conformance checks (#62500) 2025-07-07 16:14:16 +00:00
resource_loader.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
shadow_css.ts fix(compiler): support complex selectors in :nth-child() 2025-11-11 14:03:36 -08:00
style_url_resolver.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00
util.ts refactor(compiler): remove unused code (#61668) 2025-05-26 12:21:09 +00:00
version.ts refactor: update license text to point to angular.dev (#57901) 2024-09-24 15:33:00 +02:00