mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-20 19:29:43 +00:00
887d955fc4
Now that we can make any filter operator indirect through a tiddler we don't need to have that as a special capability of the search operator.
28 lines
517 B
JavaScript
28 lines
517 B
JavaScript
/*\
|
|
title: $:/core/modules/filters/search.js
|
|
type: application/javascript
|
|
module-type: filteroperator
|
|
|
|
Filter operator for searching for the text in the operand tiddler
|
|
|
|
\*/
|
|
(function(){
|
|
|
|
/*jslint node: true, browser: true */
|
|
/*global $tw: false */
|
|
"use strict";
|
|
|
|
/*
|
|
Export our filter function
|
|
*/
|
|
exports.search = function(source,operator,options) {
|
|
var invert = operator.prefix === "!";
|
|
return options.wiki.search(operator.operand,{
|
|
titles: source,
|
|
invert: invert,
|
|
exclude: [operator.operand]
|
|
});
|
|
};
|
|
|
|
})();
|