1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-17 23:34:50 +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 type: application/javascript
module-type: filteroperator module-type: filteroperator
@ -15,10 +15,9 @@ Filter operator for searching for the text in the operand tiddler
/* /*
Export our filter function Export our filter function
*/ */
exports.searchVia = function(source,operator,options) { exports.search = function(source,operator,options) {
var term = options.wiki.getTiddlerText(operator.operand,""), var invert = operator.prefix === "!";
invert = operator.prefix === "!"; return options.wiki.search(operator.operand,{
return options.wiki.search(term,{
titles: source, titles: source,
invert: invert, invert: invert,
exclude: [operator.operand] exclude: [operator.operand]