Browse Source

isValidIdentifier: ignore bug function

Igor 2 years ago
parent
commit
190131944f
1 changed files with 5 additions and 4 deletions
  1. 5 4
      js/util/utils.js

+ 5 - 4
js/util/utils.js

@@ -194,10 +194,11 @@ export function isKeyword (text) {
 
 export function isValidIdentifier (identifier_str) {
   const validRegex = /^[a-zA-Z_][a-zA-Z0-9_]*$/.test(identifier_str);
-  if (!validRegex) {
-    return false;
-  }
-  return !isKeyword(identifier_str);
+  return validRegex;
+  // if (!validRegex) {
+  //   return false;
+  // }
+  // return !isKeyword(identifier_str);
 }
 
 export function getCodeEditorModeConfig () {