Skip to content

Commit 3f654bc

Browse files
committed
Revert previous merge from #9595
This reverts commit eb8f69d.
1 parent a45a872 commit 3f654bc

File tree

2 files changed

+5
-10
lines changed

2 files changed

+5
-10
lines changed

core/modules/filters.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -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) {
244244
Compile a filter into a function with the signature fn(source,widget) where:
245245
source: an iterator function for the source tiddlers, called source(iterator), where iterator is called as iterator(tiddler,title)
246246
widget: 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

core/modules/filters/subfilter.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ Filter operator returning its operand evaluated as a filter
1313
Export our filter function
1414
*/
1515
exports.subfilter = function(source,operator,options) {
16-
var suffixes = operator.suffixes || [],
17-
defaultFilterRunPrefix = (suffixes[0] || [])[0] || "or";
18-
var list = options.wiki.filterTiddlers(operator.operand,options.widget,source,{defaultFilterRunPrefix});
16+
var list = options.wiki.filterTiddlers(operator.operand,options.widget,source);
1917
if(operator.prefix === "!") {
2018
var results = [];
2119
source(function(tiddler,title) {

0 commit comments

Comments
 (0)