@@ -230,8 +230,8 @@ exports.getFilterRunPrefixes = function() {
230230 return this . filterRunPrefixes ;
231231}
232232
233- exports . filterTiddlers = function ( filterString , widget , source , options ) {
234- var fn = this . compileFilter ( filterString , options ) ;
233+ exports . filterTiddlers = function ( filterString , widget , source ) {
234+ var fn = this . compileFilter ( filterString ) ;
235235 try {
236236 const fnResult = fn . call ( this , source , widget ) ;
237237 return fnResult ;
@@ -244,11 +244,8 @@ exports.filterTiddlers = function(filterString,widget,source,options) {
244244Compile a filter into a function with the signature fn(source,widget) where:
245245source: an iterator function for the source tiddlers, called source(iterator), where iterator is called as iterator(tiddler,title)
246246widget: an optional widget node for retrieving the current tiddler etc.
247- options: optional hashmap of options
248- options.defaultFilterRunPrefix: the default filter run prefix to use when none is specified
249247*/
250- exports . compileFilter = function ( filterString , options ) {
251- var defaultFilterRunPrefix = options ?. defaultFilterRunPrefix || "or" ;
248+ exports . compileFilter = function ( filterString ) {
252249 if ( ! this . filterCache ) {
253250 this . filterCache = Object . create ( null ) ;
254251 this . filterCacheCount = 0 ;
@@ -357,7 +354,7 @@ exports.compileFilter = function(filterString,options) {
357354 var options = { wiki : self , suffixes : operation . suffixes || [ ] } ;
358355 switch ( operation . prefix || "" ) {
359356 case "" : // No prefix means that the operation is unioned into the result
360- return filterRunPrefixes [ defaultFilterRunPrefix ] ( operationSubFunction , options ) ;
357+ return filterRunPrefixes [ "or" ] ( operationSubFunction , options ) ;
361358 case "=" : // The results of the operation are pushed into the result without deduplication
362359 return filterRunPrefixes [ "all" ] ( operationSubFunction , options ) ;
363360 case "-" : // The results of this operation are removed from the main result
0 commit comments