mirror of
https://github.com/mountain-loop/yaak.git
synced 2026-11-17 22:21:26 +01:00
Support dashes in template variable/fn names
This commit is contained in:
1 parent
8cd9c031e8
commit
88ff7f4300
2 files changed
+50
-2
No files matched your search
@@ -159,7 +159,7 @@ const EnvironmentEditor = function ({
|
||||
const validateName = useCallback((name: string) => {
|
||||
// Empty just means the variable doesn't have a name yet, and is unusable
|
||||
if (name === '') return true;
|
||||
return name.match(/^[a-z_][a-z0-9_]*$/i) != null;
|
||||
return name.match(/^[a-z][a-z0-9_-]*$/i) != null;
|
||||
}, []);
|
||||
|
||||
return (
|
||||
|
||||
Reference in new issue
Block a user