Change separators to match doc (#7303)

This commit is contained in:
yaisog 2023-11-21 12:58:12 +01:00 committed by GitHub
parent de6b866f22
commit 4c2979286b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

@ -1287,7 +1287,7 @@ exports.search = function(text,options) {
console.log("Regexp error parsing /(" + text + ")/" + flags + ": ",e);
}
} else if(options.some) {
terms = text.trim().split(/ +/);
terms = text.trim().split(/[^\S\xA0]+/);
if(terms.length === 1 && terms[0] === "") {
searchTermsRegExps = null;
} else {
@ -1298,7 +1298,7 @@ exports.search = function(text,options) {
searchTermsRegExps.push(new RegExp("(" + regExpStr + ")",flags));
}
} else { // default: words
terms = text.split(/ +/);
terms = text.split(/[^\S\xA0]+/);
if(terms.length === 1 && terms[0] === "") {
searchTermsRegExps = null;
} else {