support define variable start with '$'

This commit is contained in:
codetypes committed 2025-04-14 11:41:45 +08:00
1 parent 8a2b3f361b
commit 5fb3a650fb
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -141,7 +141,7 @@ export const isNewVersion = (version: string) => {
};
export const isValidVariableName = (name: string) => {
return /^[a-zA-Z_$]*$/.test(name);
return /^[a-zA-Z_$][a-zA-Z_$0-9]*$/.test(name);
};
export const isSubtreeRoot = (data: NodeData) => {