1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-09-29 23:40:45 +00:00

Change the search filter operator to not indirect through a tiddler

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.
This commit is contained in:
Jeremy Ruston 2013-05-27 17:58:27 +01:00
parent f4a3b25d3e
commit 887d955fc4

View File

@ -1,5 +1,5 @@
/*\
title: $:/core/modules/filters/searchVia.js
title: $:/core/modules/filters/search.js
type: application/javascript
module-type: filteroperator
@ -15,10 +15,9 @@ Filter operator for searching for the text in the operand tiddler
/*
Export our filter function
*/
exports.searchVia = function(source,operator,options) {
var term = options.wiki.getTiddlerText(operator.operand,""),
invert = operator.prefix === "!";
return options.wiki.search(term,{
exports.search = function(source,operator,options) {
var invert = operator.prefix === "!";
return options.wiki.search(operator.operand,{
titles: source,
invert: invert,
exclude: [operator.operand]