2013-05-25 16:26:22 +00:00
|
|
|
/*\
|
2013-05-27 16:58:27 +00:00
|
|
|
title: $:/core/modules/filters/search.js
|
2013-05-25 16:26:22 +00:00
|
|
|
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
|
|
|
|
*/
|
2013-05-27 16:58:27 +00:00
|
|
|
exports.search = function(source,operator,options) {
|
|
|
|
var invert = operator.prefix === "!";
|
|
|
|
return options.wiki.search(operator.operand,{
|
2013-05-25 16:26:22 +00:00
|
|
|
titles: source,
|
2013-08-03 08:28:51 +00:00
|
|
|
invert: invert
|
2013-05-25 16:26:22 +00:00
|
|
|
});
|
|
|
|
};
|
|
|
|
|
|
|
|
})();
|