From 48312272adb17610db96d50758e6af947cab7b1d Mon Sep 17 00:00:00 2001 From: Jermolene Date: Fri, 29 Aug 2014 09:54:31 +0100 Subject: [PATCH] Extend 'all' filter operator to select all source tiddlers --- core/modules/filters/all.js | 4 +++- editions/tw5.com/tiddlers/filters/FilterOperator all.tid | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/core/modules/filters/all.js b/core/modules/filters/all.js index ee31f4abb..da9e949dc 100644 --- a/core/modules/filters/all.js +++ b/core/modules/filters/all.js @@ -34,7 +34,9 @@ exports.all = function(source,operator,options) { var results = [], subops = operator.operand.split("+"); // Check for common optimisations - if(subops.length === 1 && subops[0] === "tiddlers") { + if(subops.length === 1 && subops[0] === "") { + return source; + } else if(subops.length === 1 && subops[0] === "tiddlers") { return options.wiki.each; } else if(subops.length === 1 && subops[0] === "shadows") { return options.wiki.eachShadow; diff --git a/editions/tw5.com/tiddlers/filters/FilterOperator all.tid b/editions/tw5.com/tiddlers/filters/FilterOperator all.tid index 44fb530c0..280703c02 100644 --- a/editions/tw5.com/tiddlers/filters/FilterOperator all.tid +++ b/editions/tw5.com/tiddlers/filters/FilterOperator all.tid @@ -17,4 +17,5 @@ For example: |`[all[current]]` |Selects the current tiddler | |`[all[missing]]` |Selects all MissingTiddlers | |`[all[orphans]]` |Selects all OrphanTiddlers | +|`[all[]]` |Selects all the source tiddlers available to the filter |