소스 검색

Fixes microsoft/monaco-editor#1123

Alex Dima 5 년 전
부모
커밋
b6b3e0a0db
2개의 변경된 파일13개의 추가작업 그리고 0개의 파일을 삭제
  1. 12 0
      src/handlebars/handlebars.test.ts
  2. 1 0
      src/handlebars/handlebars.ts

+ 12 - 0
src/handlebars/handlebars.test.ts

@@ -269,5 +269,17 @@ testTokenization(['handlebars', 'css'], [
 			{ startIndex: 8, type: 'attribute.value' },
 			{ startIndex: 30, type: 'delimiter.html' }
 		]
+	}],
+
+	[{
+		line: '{{test "coloring/looks broken"}}">',
+		tokens: [
+			{ startIndex: 0, type: 'delimiter.handlebars' },
+			{ startIndex: 2, type: 'variable.parameter.handlebars' },
+			{ startIndex: 6, type: '' },
+			{ startIndex: 7, type: 'string.handlebars' },
+			{ startIndex: 30, type: 'delimiter.handlebars' },
+			{ startIndex: 32, type: '' }
+		]
 	}]
 ]);

+ 1 - 0
src/handlebars/handlebars.ts

@@ -220,6 +220,7 @@ export const language = <ILanguage>{
 		],
 
 		handlebarsRoot: [
+			[/"[^"]*"/, 'string.handlebars'],
 			[/[#/][^\s}]+/, 'keyword.helper.handlebars'],
 			[/else\b/, 'keyword.helper.handlebars'],
 			[/[\s]+/],