Search over tags as well as the title and text fields

This commit is contained in:
Jeremy Ruston 2013-10-11 08:46:09 +01:00
parent 27f724d0ed
commit d3d72eff1b
1 changed files with 2 additions and 1 deletions

View File

@ -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;