From 229378ae98eaa159d2c2e758a5beccdba237dfad Mon Sep 17 00:00:00 2001 From: Alex Dima Date: Mon, 16 Dec 2019 17:23:04 +0100 Subject: [PATCH] Fixes microsoft/monaco-editor#1216 --- src/vb/vb.test.ts | 10 ++++++++++ src/vb/vb.ts | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/vb/vb.test.ts b/src/vb/vb.test.ts index 17b4ffa2..f847a92e 100644 --- a/src/vb/vb.test.ts +++ b/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' }, + ] + }], ]); diff --git a/src/vb/vb.ts b/src/vb/vb.ts index 99b90d92..82c7e179 100644 --- a/src/vb/vb.ts +++ b/src/vb/vb.ts @@ -140,7 +140,7 @@ export const language = { [/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*/, {