kopia lustrzana https://github.com/miklobit/TiddlyWiki5
Fixed search bug
rodzic
cd04fa22c6
commit
971bc68163
|
@ -647,13 +647,9 @@ exports.search = function(text,options) {
|
|||
if(contentTypeInfo ? contentTypeInfo.encoding === "utf8" : true) {
|
||||
var match = true;
|
||||
for(var t=0; t<searchTermsRegExps.length; t++) {
|
||||
// Search body
|
||||
// Search title and body
|
||||
if(match) {
|
||||
match = searchTermsRegExps[t].test(tiddler.fields.text);
|
||||
}
|
||||
// Search title
|
||||
if(match) {
|
||||
match = searchTermsRegExps[t].test(tiddler.fields.title);
|
||||
match = searchTermsRegExps[t].test(tiddler.fields.title) || searchTermsRegExps[t].test(tiddler.fields.text);
|
||||
}
|
||||
}
|
||||
return options.invert ? !match : match;
|
||||
|
|
Ładowanie…
Reference in New Issue