Преглед изворни кода

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