Forráskód Böngészése

Fix highlight for variables with numbers

Lucas de Souza 4 éve
szülő
commit
e3ac7c7dba
1 módosított fájl, 2 hozzáadás és 2 törlés
  1. 2 2
      js/util/editorMode2.js

+ 2 - 2
js/util/editorMode2.js

@@ -55,12 +55,12 @@ export function CodeEditorMode (CodeMirror) {
       hooks = parserConfig.hooks || {},
       multiLineStrings = parserConfig.multiLineStrings,
       indentStatements = false,
-      namespaceSeparator = /\./,
+      namespaceSeparator = null,
       isPunctuationChar = /[\[\]{}\(\),;\:\n]/,
       numberStart = /[\d\.]/,
       number = /^(?:0x[a-f\d]+|0b[01]+|(?:\d+\.?\d*|\.\d+)(?:e[-+]?\d+)?)/i,
       isOperatorChar = /[+\-*%=<>!\/]/,
-      isIdentifierChar = /[a-zA-Z_][a-zA-Z0-9_]*/,
+      isIdentifierChar = /[a-zA-Z0-9_]/,
       // An optional function that takes a {string} token and returns true if it
       // should be treated as a builtin.
       isReservedIdentifier = parserConfig.isReservedIdentifier || false;