|
|
@ -644,14 +644,9 @@ define([
|
|
|
|
|
|
|
|
|
|
|
|
// parse the search string into tags
|
|
|
|
// parse the search string into tags
|
|
|
|
var tags;
|
|
|
|
var tags;
|
|
|
|
lValue.replace(/^#(.*)/, function (all, t) {
|
|
|
|
if (/^#/.test(lValue)) {
|
|
|
|
tags = t.split(/\s+/)
|
|
|
|
tags = [lValue.slice(1).trim()];
|
|
|
|
.map(function (tag) {
|
|
|
|
}
|
|
|
|
return tag.replace(/^#/, '');
|
|
|
|
|
|
|
|
}).filter(function (x) {
|
|
|
|
|
|
|
|
return x;
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* returns true if an entry's tags are at least a partial match for
|
|
|
|
/* returns true if an entry's tags are at least a partial match for
|
|
|
|
one of the specified tags */
|
|
|
|
one of the specified tags */
|
|
|
@ -661,7 +656,7 @@ define([
|
|
|
|
T = T.map(function (t) { return t.toLowerCase(); });
|
|
|
|
T = T.map(function (t) { return t.toLowerCase(); });
|
|
|
|
return tags.some(function (tag) {
|
|
|
|
return tags.some(function (tag) {
|
|
|
|
return T.some(function (t) {
|
|
|
|
return T.some(function (t) {
|
|
|
|
return t.indexOf(tag) !== -1;
|
|
|
|
return t === tag;
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|
|
|
|
};
|
|
|
|
};
|
|
|
|