mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-26 19:47:20 +00:00
Search over tags as well as the title and text fields
This commit is contained in:
parent
27f724d0ed
commit
d3d72eff1b
@ -754,7 +754,8 @@ exports.search = function(text,options) {
|
||||
for(var t=0; t<searchTermsRegExps.length; t++) {
|
||||
// Search title and body
|
||||
if(match) {
|
||||
match = searchTermsRegExps[t].test(tiddler.fields.title) || searchTermsRegExps[t].test(tiddler.fields.text);
|
||||
var tags = tiddler.fields.tags ? tiddler.fields.tags.join("\0") : "";
|
||||
match = searchTermsRegExps[t].test(tiddler.fields.title) || searchTermsRegExps[t].test(tags) || searchTermsRegExps[t].test(tiddler.fields.text);
|
||||
}
|
||||
}
|
||||
return options.invert ? !match : match;
|
||||
|
Loading…
Reference in New Issue
Block a user