Explorar o código

Fix highlight for variables with numbers

Lucas de Souza %!s(int64=5) %!d(string=hai) anos
pai
achega
e3ac7c7dba
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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;