Jelajahi Sumber

improve handlebars tokens

Alex Dima 8 tahun lalu
induk
melakukan
ac89ee029e
2 mengubah file dengan 6 tambahan dan 6 penghapusan
  1. 4 4
      src/handlebars.ts
  2. 2 2
      test/handlebars.test.ts

+ 4 - 4
src/handlebars.ts

@@ -215,14 +215,14 @@ export var language = <ILanguage> {
 
 
 		handlebarsInSimpleState: [
-			[/\{\{\{?/, 'metatag.handlebars'],
-			[/\}\}\}?/, { token: 'metatag.handlebars', switchTo: '@$S2.$S3' }],
+			[/\{\{\{?/, 'punctuation.handlebars'],
+			[/\}\}\}?/, { token: 'punctuation.handlebars', switchTo: '@$S2.$S3' }],
 			{ include: 'handlebarsRoot' }
 		],
 
 		handlebarsInEmbeddedState: [
-			[/\{\{\{?/, 'metatag.handlebars'],
-			[/\}\}\}?/, { token: 'metatag.handlebars', switchTo: '@$S2.$S3', nextEmbedded: '$S3' }],
+			[/\{\{\{?/, 'punctuation.handlebars'],
+			[/\}\}\}?/, { token: 'punctuation.handlebars', switchTo: '@$S2.$S3', nextEmbedded: '$S3' }],
 			{ include: 'handlebarsRoot' }
 		],
 

+ 2 - 2
test/handlebars.test.ts

@@ -18,8 +18,8 @@ function getTag(name: string) {
 }
 
 const handlebarsTokenTypes = {
-	EMBED: 'metatag.handlebars',
-	EMBED_UNESCAPED: 'metatag.handlebars',
+	EMBED: 'punctuation.handlebars',
+	EMBED_UNESCAPED: 'punctuation.handlebars',
 	KEYWORD: 'keyword.helper.handlebars',
 	VARIABLE: 'variable.parameter.handlebars',
 }