Explorar o código

Fixes microsoft/monaco-editor#1216

Alex Dima %!s(int64=5) %!d(string=hai) anos
pai
achega
229378ae98
Modificáronse 2 ficheiros con 11 adicións e 1 borrados
  1. 10 0
      src/vb/vb.test.ts
  2. 1 1
      src/vb/vb.ts

+ 10 - 0
src/vb/vb.test.ts

@@ -453,4 +453,14 @@ testTokenization('vb', [
 			{ startIndex: 0, type: 'string.vb' },
 		]
 	}],
+
+	[{
+		line: `End qweqweqweqweqwe'here always becomes highlighted Loop `,
+		tokens: [
+			{ startIndex: 0, type: 'keyword.end.vb' },
+			{ startIndex: 3, type: '' },
+			{ startIndex: 4, type: 'identifier.vb' },
+			{ startIndex: 19, type: 'comment.vb' },
+		]
+	}],
 ]);

+ 1 - 1
src/vb/vb.ts

@@ -140,7 +140,7 @@ export const language = <ILanguage>{
 			[/loop(?!\w)/, { token: 'keyword.tag-do' }],
 
 			// usual ending tags
-			[/end\s+(?!for|do)([a-zA-Z_]\w*)/, { token: 'keyword.tag-$1' }],
+			[/end\s+(?!for|do)(addhandler|class|enum|event|function|get|if|interface|module|namespace|operator|property|raiseevent|removehandler|select|set|structure|sub|synclock|try|while|with|using)/, { token: 'keyword.tag-$1' }],
 
 			// identifiers, tagwords, and keywords
 			[/[a-zA-Z_]\w*/, {