Updated to pass eslint
This commit is contained in:
parent
a7d43caccb
commit
6202038c65
1 changed files with 6 additions and 6 deletions
|
@ -47,14 +47,14 @@ function createAwesompleteInstance(element, separator, tags = []) {
|
||||||
|
|
||||||
// Tags are separated by separator. Ignore leading search flags
|
// Tags are separated by separator. Ignore leading search flags
|
||||||
awesome.filter = (text, input) => {
|
awesome.filter = (text, input) => {
|
||||||
let filter_func = Awesomplete.FILTER_CONTAINS;
|
let filterFunc = Awesomplete.FILTER_CONTAINS;
|
||||||
let input_flagged = input.replace( /^[\-\~\+]/, '' );
|
const inputFlagged = input.replace(/^[-~+]/, '');
|
||||||
if (input !== input_flagged) {
|
if (input !== inputFlagged) {
|
||||||
input = input_flagged;
|
input = inputFlagged;
|
||||||
filter_func = Awesomplete.FILTER_STARTSWITH;
|
filterFunc = Awesomplete.FILTER_STARTSWITH;
|
||||||
}
|
}
|
||||||
|
|
||||||
return filter_func(text, input.match(new RegExp(`[^${separator}]*$`))[0]);
|
return filterFunc(text, input.match(new RegExp(`[^${separator}]*$`))[0]);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Insert new selected tag in the input
|
// Insert new selected tag in the input
|
||||||
|
|
Loading…
Reference in a new issue