Skip to content

Commit 4dc4438

Browse files
committed
fix(syntaxes): Do not apply block syntax highlighting to JS and CSS in templates (#1952)
This commit excludes the block syntax highlighting from JS and CSS scopes in templates. This would include `script` and `style` tags. (cherry picked from commit abfdaa7)
1 parent 89379d1 commit 4dc4438

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

syntaxes/src/template-blocks.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 TemplateBlocks: GrammarDefinition = {
1212
scopeName: 'template.blocks.ng',
13-
injectionSelector: 'L:text.html -comment -expression.ng -meta.tag',
13+
injectionSelector: 'L:text.html -comment -expression.ng -meta.tag -source.css -source.js',
1414
patterns: [
1515
{include: '#block'},
1616
],

syntaxes/template-blocks.json

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

0 commit comments

Comments
 (0)