mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-12-04 12:15:28 +00:00
Regex optimisation suggested by @Skeeve
This commit is contained in:
1 parent
e66fb948c1
commit
bd80bf4acc
1 file changed
+1
-1
@@ -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