mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-03-25 04:46:55 +00:00
Regex optimisation suggested by @Skeeve
This commit is contained in:
parent
e66fb948c1
commit
bd80bf4acc
@ -940,7 +940,7 @@ exports.search = function(text,options) {
|
||||
searchTermsRegExps = [new RegExp("(" + $tw.utils.escapeRegExp(text) + ")",flags)];
|
||||
}
|
||||
} else {
|
||||
terms = text.replace(/( +)/g," ").split(" ");
|
||||
terms = text.split(/ +/);
|
||||
if(terms.length === 1 && terms[0] === "") {
|
||||
searchTermsRegExps = null;
|
||||
} else {
|
||||
|
Loading…
x
Reference in New Issue
Block a user