1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2026-04-21 06:11:29 +00:00

Update filter operator to support specifying a default filter run prefix

This commit is contained in:
Jeremy Ruston
2026-01-19 21:23:43 +00:00
parent 9b56734451
commit 2a1c607450

View File

@@ -13,7 +13,9 @@ Filter operator returning those input titles that pass a subfilter
Export our filter function
*/
exports.filter = function(source,operator,options) {
var filterFn = options.wiki.compileFilter(operator.operand),
var suffixes = operator.suffixes || [],
defaultFilterRunPrefix = (suffixes[0] || [])[0] || "or",
filterFn = options.wiki.compileFilter(operator.operand,{defaultFilterRunPrefix}),
results = [],
target = operator.prefix !== "!";
source(function(tiddler,title) {