Skip to content

Commit 80e00ff

Browse files
atscottthePunderWoman
authored andcommitted
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 angular/vscode-ng-language-service#1991 PR Close #64392
1 parent 25d45ba commit 80e00ff

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

vscode-ng-language-service/syntaxes/src/template.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {GrammarDefinition} from './types';
1010

1111
export const Template: GrammarDefinition = {
1212
scopeName: 'template.ng',
13-
injectionSelector: 'L:text.html -comment',
13+
injectionSelector: 'L:text.html -comment -control.block.ng',
1414
patterns: [{include: '#interpolation'}],
1515
repository: {
1616
interpolation: {

vscode-ng-language-service/syntaxes/template.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"scopeName": "template.ng",
3-
"injectionSelector": "L:text.html -comment",
3+
"injectionSelector": "L:text.html -comment -control.block.ng",
44
"patterns": [
55
{
66
"include": "#interpolation"

0 commit comments

Comments
 (0)