Update regex and condition check according to suggestion
This commit is contained in:
parent
54a1060a81
commit
8018756051
2 changed files with 3 additions and 11 deletions
|
|
@ -45,7 +45,7 @@ exports.parForEach = function(array, fn, callback) {
|
|||
}
|
||||
};
|
||||
|
||||
var ID_REGEX = /[a-zA-Z_0-9\$-]|[^\u0000-\u007F]/;
|
||||
var ID_REGEX = /[a-zA-Z_0-9\$-\u007F-\uFFFF]/;
|
||||
|
||||
exports.retrievePrecedingIdentifier = function(text, pos, regex) {
|
||||
regex = regex || ID_REGEX;
|
||||
|
|
|
|||
|
|
@ -168,11 +168,7 @@ require("../config").defineOptions(Editor.prototype, "editor", {
|
|||
enableBasicAutocompletion: {
|
||||
set: function(val) {
|
||||
if (val) {
|
||||
if (Array.isArray(val)) {
|
||||
completers = val;
|
||||
}
|
||||
|
||||
this.completers = completers;
|
||||
this.completers = Array.isArray(val)? val: completers;
|
||||
this.commands.addCommand(Autocomplete.startCommand);
|
||||
} else {
|
||||
this.commands.removeCommand(Autocomplete.startCommand);
|
||||
|
|
@ -188,11 +184,7 @@ require("../config").defineOptions(Editor.prototype, "editor", {
|
|||
enableLiveAutocompletion: {
|
||||
set: function(val) {
|
||||
if (val) {
|
||||
if (Array.isArray(val)) {
|
||||
completers = val;
|
||||
}
|
||||
|
||||
this.completers = completers;
|
||||
this.completers = Array.isArray(val)? val: completers;
|
||||
|
||||
// On each change automatically trigger the autocomplete
|
||||
this.completers = completers;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue