Explorar o código

HUE-4574 [editor] Enable autocompletion after '-' without whitespace

Johan Ahlen %!s(int64=9) %!d(string=hai) anos
pai
achega
e0f85d7

+ 3 - 0
desktop/core/src/desktop/static/desktop/js/sqlAutocompleter2.js

@@ -25,6 +25,8 @@
   }
 }(this, function (sqlParser, sqlFunctions) {
 
+  var IDENTIFIER_REGEX = /[a-zA-Z_0-9\$\u00A2-\uFFFF]/;
+
   /**
    * @param {Object} options
    * @param {Snippet} options.snippet
@@ -456,6 +458,7 @@
     completions.forEach(function (completion) {
       completion.score = currentScore;
       completion.prioritizeScore = true;
+      completion.identifierRegex = IDENTIFIER_REGEX;
       currentScore--;
     });