Changed variable name regex to allow $ and _

This commit is contained in:
Stefan Zermatten
2023-01-31 14:51:39 +02:00
parent 72d932538b
commit cbbbcaf56a

View File

@@ -1,4 +1,4 @@
// Must contain a letter, and be made of word characters only
const VARIABLE_NAME_REGEX = /^[a-z][\w-]*$/i;
const VARIABLE_NAME_REGEX = /^[a-z$][\w_]*$/i;
export default VARIABLE_NAME_REGEX;