angular/packages/compiler/src
Matthew Beck ecea909bcc fix(compiler): don't choke on unbalanced parens in declaration block
Following https://github.com/angular/angular/pull/64509 we started
choking on unbalanced closing parentheses in declaration blocks,
specifically in quoted background-image urls. This was reported in
https://github.com/angular/angular/issues/65137.

This occured because we previously (and now again) traverse the entire
declaration block when selecting for :host-context() selectors to shim.
This is an oddity of how we parse styles today, and is likely something
we'd want to remove if we parsed selectors properly.

This change adds a new flag to _splitOnTopLevelCommas which allows it to
continue past unbalanced closing parentheses in the declaration block,
returning _convertColonHostContext to its previous behavior while
keeping support for the extra nesting in :host-context().

(cherry picked from commit 9e7ddcaa10)
2025-11-17 17:46:04 +00:00
..
expression_parser fix(compiler): recover template literals with broken expressions (#64150) 2025-09-30 16:01:50 -04:00
i18n refactor(compiler): Remove the interpolation config (#64071) 2025-09-29 15:29:46 -04:00
ml_parser fix(compiler): correctly compile long numeric HTML entities (#64297) 2025-10-17 18:23:44 +00:00
output refactor(compiler): desambiguate and export RegularExpressionLiteralExpr 2025-10-29 13:45:20 -07:00
render3 refactor(core): remove unused type 2025-11-12 21:13:51 +00:00
schema refactor(core): render additional WAI-ARIA 1.3 property bindings as attributes 2025-11-11 14:09:02 -08:00
template/pipeline perf(forms): implement change detection for field control bindings 2025-11-04 16:11:33 -08:00
template_parser refactor(compiler): Remove the interpolation config (#64071) 2025-09-29 15:29:46 -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): parse options parameter on viewport triggers (#64130) 2025-10-09 05:32:20 -07:00
compiler.ts refactor(compiler): desambiguate and export RegularExpressionLiteralExpr 2025-10-29 13:45:20 -07:00
compiler_facade_interface.ts refactor(core): rename ExperimentalIsolatedShadowDom to IsolatedShadowDom 2025-11-11 08:46:10 -08: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): desambiguate and export RegularExpressionLiteralExpr 2025-10-29 13:45:20 -07:00
core.ts refactor(core): rename ExperimentalIsolatedShadowDom to IsolatedShadowDom 2025-11-11 08:46:10 -08: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 refactor(compiler): remove unused code 2025-11-11 10:04:32 -08: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): don't choke on unbalanced parens in declaration block 2025-11-17 17:46:04 +00: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