瀏覽代碼

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

Johan Ahlen 9 年之前
父節點
當前提交
e0f85d7
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      desktop/core/src/desktop/static/desktop/js/sqlAutocompleter2.js

+ 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--;
     });