소스 검색

Merge pull request #2809 from gitpaladin/missing-pb-syntax-directive

Fix token while missing `syntax=` directive
Alexandru Dima 3 년 전
부모
커밋
7eee44891f
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      src/basic-languages/protobuf/protobuf.ts

+ 5 - 0
src/basic-languages/protobuf/protobuf.ts

@@ -132,6 +132,11 @@ export const language = <languages.IMonarchLanguage>{
 			[
 				/(")(proto2)(")/,
 				['string.quote', 'string', { token: 'string.quote', switchTo: '@topLevel.proto2' }]
+			],
+			[
+				// If no `syntax` provided, regarded as proto2
+				/.*?/,
+				{ token: '', switchTo: '@topLevel.proto2' }
 			]
 		],