Title: compiler: interpolation ends early when a regular expression literal contains }} · Issue #71915 · angular/angular · GitHub
Open Graph Title: compiler: interpolation ends early when a regular expression literal contains }} · Issue #71915 · angular/angular
X Title: compiler: interpolation ends early when a regular expression literal contains }} · Issue #71915 · angular/angular
Description: Bug Hi Angular team! Angular treats }} inside a regular expression literal as the end of an interpolation. Minimal reproduction {{ /[}}]/u.test('}') }} Expected true. Actual Unexpected closing block. The same expression fails in a title ...
Open Graph Description: Bug Hi Angular team! Angular treats }} inside a regular expression literal as the end of an interpolation. Minimal reproduction {{ /[}}]/u.test('}') }} Expected true. Actual Unexpected closing bloc...
X Description: Bug Hi Angular team! Angular treats }} inside a regular expression literal as the end of an interpolation. Minimal reproduction {{ /[}}]/u.test('}') }} Expected true. Actual Unexpected clos...
Opengraph URL: https://github.com/angular/angular/issues/71915
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"compiler: interpolation ends early when a regular expression literal contains }}","articleBody":"### Bug\n\nHi Angular team! Angular treats `}}` inside a regular expression literal as the end of an interpolation.\n\n### Minimal reproduction\n\n```html\n{{ /[}}]/u.test('}') }}\n```\n\nExpected `true`. Actual `Unexpected closing block`. The same expression fails in a `title` interpolation with `Unterminated regular expression` but parses successfully in a property binding. The equivalent pattern `/[}]/u` also parses in interpolation. AOT compilation with `ngc` reports `NG5002` for `{{ /}}/.test('}}') }}`.\n\n### Cause and possible fix\n\nThe scanners appear to treat `}}` inside the regex as a closing delimiter. A possible fix is to skip regex literal contents while preserving division expressions such as `{{ 6 / 2 }}`. [HTML lexer](https://github.com/angular/angular/blob/0dafb368349f6d2c436296801f2f642747899d2d/packages/compiler/src/ml_parser/lexer.ts#L1280-L1334) · [Expression parser](https://github.com/angular/angular/blob/0dafb368349f6d2c436296801f2f642747899d2d/packages/compiler/src/expression_parser/parser.ts#L523-L537)\n\n### Environment\n\nAngular compiler 22.2.5, Node.js 24.22.2, macOS arm64. Regression status unknown.","author":{"url":"https://github.com/nagahara-naoki","@type":"Person","name":"nagahara-naoki"},"datePublished":"2026-11-10T12:56:11Z","url":"https://github.com/angular/angular/issues/71915"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:238ee46d-5808-6478-2067-23f7e6e678a8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BF04:4E3C:E1BFC5:12C486B:6B00FFF5 |
| html-safe-nonce | acd9c6b6237cc3e70263a2d9b19688794a45e66823cb30cc0006210068e3ef3c |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRjA0OjRFM0M6RTFCRkM1OjEyQzQ4NkI6NkIwMEZGRjUiLCJ2aXNpdG9yX2lkIjoiNTg0ODY2NjYxNDcwMjA3OTk4OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ca00a215b17a5e77544e15930a26c8ba28bfee906c20619d4f1b931d4cbf4145 |
| hovercard-subject-tag | issue:6307258817 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/angular/angular/71915/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cdd330febc5b359bae4a440b298c6d2ede30b626c23f7377b0a48945b74e4673/angular/angular/issues/71915 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cdd330febc5b359bae4a440b298c6d2ede30b626c23f7377b0a48945b74e4673/angular/angular/issues/71915 |
| og:image:alt | Bug Hi Angular team! Angular treats }} inside a regular expression literal as the end of an interpolation. Minimal reproduction {{ /[}}]/u.test('}') }} Expected true. Actual Unexpected closing bloc... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | nagahara-naoki |
| hostname | github.com |
| expected-hostname | github.com |
| None | cb7fa109eca7d4156c889f474306b0e91336055e9adf8fd4684b61e49094d124 |
| turbo-cache-control | no-preview |
| go-import | github.com/angular/angular git https://github.com/angular/angular.git |
| octolytics-dimension-user_id | 139426 |
| octolytics-dimension-user_login | angular |
| octolytics-dimension-repository_id | 24195339 |
| octolytics-dimension-repository_nwo | angular/angular |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24195339 |
| octolytics-dimension-repository_network_root_nwo | angular/angular |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 2b59d31a4e44f08b7af67a4b67f8fd0af3befe2a |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width