mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-08-31 01:48:02 +00:00
Regex optimisation suggested by @Skeeve
This commit is contained in:
@@ -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 {
|
||||
|
Reference in New Issue
Block a user