From dd1cd074c9829e89af00f2124bf6d45eeb7dbc4f Mon Sep 17 00:00:00 2001 From: Elena Stoeva Date: Fri, 19 Jul 2024 14:01:58 +0100 Subject: [PATCH] [Console Monaco] Resolve uncaught error from tokenizer --- .../kbn-monaco/src/console/lexer_rules/console_editor.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/kbn-monaco/src/console/lexer_rules/console_editor.ts b/packages/kbn-monaco/src/console/lexer_rules/console_editor.ts index 97984a83b2c9f..8961a2652b644 100644 --- a/packages/kbn-monaco/src/console/lexer_rules/console_editor.ts +++ b/packages/kbn-monaco/src/console/lexer_rules/console_editor.ts @@ -26,7 +26,12 @@ export const lexerRules: monaco.languages.IMonarchLanguage = { root: [ ...consoleSharedLexerRules.tokenizer.root, // method - matchTokensWithEOL('method', /([a-zA-Z]+)/, 'root', 'method_sep'), + matchTokensWithEOL( + 'method', + /([Gg][Ee][Tt])|([Pp][Oo][Ss][Tt])|([Pp][Uu][Tt])|([Pp][Aa][Tt][Cc][Hh])|([Dd][Ee][Ll][Ee][Tt][Ee])|([Hh][Ee][Aa][Dd])/, + 'root', + 'method_sep' + ), // whitespace matchToken('whitespace', '\\s+'), // text