LSP edits for multi-input formats.
This commit is contained in:
parent
b91d817e33
commit
c7e70ad9f8
2 changed files with 42 additions and 32 deletions
20
lsp/mist.js
20
lsp/mist.js
|
@ -4165,11 +4165,21 @@ var mist = {
|
|||
},
|
||||
inputMatch: function(match,string){
|
||||
if (typeof match == 'undefined') { return false; }
|
||||
|
||||
var query = match.replace(/[^\w\s]/g,'\\$&'); //prefix any special chars with a \
|
||||
query = query.replace(/\\\?/g,'.').replace(/\\\*/g,'(?:.)*'); //replace ? with . and * with any amount of .
|
||||
var regex = new RegExp('^'+query+'$','i'); //case insensitive
|
||||
return regex.test(string);
|
||||
if (typeof match == 'string') {
|
||||
var query = match.replace(/[^\w\s]/g,'\\$&'); //prefix any special chars with a \
|
||||
query = query.replace(/\\\?/g,'.').replace(/\\\*/g,'(?:.)*'); //replace ? with . and * with any amount of .
|
||||
var regex = new RegExp('^'+query+'$','i'); //case insensitive
|
||||
return regex.test(string);
|
||||
}
|
||||
for (var s in match){
|
||||
var query = match[s].replace(/[^\w\s]/g,'\\$&'); //prefix any special chars with a \
|
||||
query = query.replace(/\\\?/g,'.').replace(/\\\*/g,'(?:.)*'); //replace ? with . and * with any amount of .
|
||||
var regex = new RegExp('^'+query+'$','i'); //case insensitive
|
||||
if (regex.test(string)){
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
},
|
||||
convertBuildOptions: function(input,saveas) {
|
||||
var build = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue