From 3fe25d64e554a8ad1debf7c2ebf80288b7d2af57 Mon Sep 17 00:00:00 2001 From: Olivier Gagnon Date: Thu, 11 Nov 2021 11:21:21 -0500 Subject: [PATCH] ns function token even more precise. --- src/ScriptEditor/ui/ScriptEditorRoot.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ScriptEditor/ui/ScriptEditorRoot.tsx b/src/ScriptEditor/ui/ScriptEditorRoot.tsx index 58c08d2d9..2ce262936 100644 --- a/src/ScriptEditor/ui/ScriptEditorRoot.tsx +++ b/src/ScriptEditor/ui/ScriptEditorRoot.tsx @@ -355,7 +355,7 @@ export function Root(props: IProps): React.ReactElement { .loader(); l.language.tokenizer.root.unshift(["ns", { token: "ns" }]); for (const symbol of symbols) - l.language.tokenizer.root.unshift(["[^a-zA-Z]" + symbol + "[^a-zA-Z]", { token: "netscriptfunction" }]); + l.language.tokenizer.root.unshift(["[^a-zA-Z0-9]" + symbol + "[^a-zA-Z0-9]", { token: "netscriptfunction" }]); const otherKeywords = ["let", "const", "var", "function"]; const otherKeyvars = ["true", "false", "null", "undefined"]; otherKeywords.forEach((k) => l.language.tokenizer.root.unshift([k, { token: "otherkeywords" }]));