From 80e00ff4e5833c35e19cfca271dff51121108333 Mon Sep 17 00:00:00 2001 From: Andrew Scott Date: Mon, 13 Oct 2025 11:37:35 -0700 Subject: [PATCH] fix(language-service): prevent interpolation from superseding block braces (#64392) This change omits the injection of the template syntaxes inside any existing block scope. The injection is not needed because the template and expression scopes are included explicitly as patterns where appropriate under the template-blocks definitions. This change prevents the interpolation curly braces from superseding the match for the open curly of the block body. This issue also happens with ICUs (#62697), but those do not have any named scopes to exclude as of today. fixes https://github.com/angular/vscode-ng-language-service/issues/1991 PR Close #64392 --- vscode-ng-language-service/syntaxes/src/template.ts | 2 +- vscode-ng-language-service/syntaxes/template.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/vscode-ng-language-service/syntaxes/src/template.ts b/vscode-ng-language-service/syntaxes/src/template.ts index 0bcff76be49..0fd061cc755 100644 --- a/vscode-ng-language-service/syntaxes/src/template.ts +++ b/vscode-ng-language-service/syntaxes/src/template.ts @@ -10,7 +10,7 @@ import {GrammarDefinition} from './types'; export const Template: GrammarDefinition = { scopeName: 'template.ng', - injectionSelector: 'L:text.html -comment', + injectionSelector: 'L:text.html -comment -control.block.ng', patterns: [{include: '#interpolation'}], repository: { interpolation: { diff --git a/vscode-ng-language-service/syntaxes/template.json b/vscode-ng-language-service/syntaxes/template.json index c355fac1445..c81b0e488f5 100644 --- a/vscode-ng-language-service/syntaxes/template.json +++ b/vscode-ng-language-service/syntaxes/template.json @@ -1,6 +1,6 @@ { "scopeName": "template.ng", - "injectionSelector": "L:text.html -comment", + "injectionSelector": "L:text.html -comment -control.block.ng", "patterns": [ { "include": "#interpolation"