Fix token while missing syntax= directive

This commit is contained in:
cmlchen 2021-12-09 16:04:03 +08:00
parent 83f13054ad
commit fbe2b4c7a9

View file

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