1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 18:17:20 +00:00

Extend 'all' filter operator to select all source tiddlers

This commit is contained in:
Jermolene 2014-08-29 09:54:31 +01:00
parent 1b964873c4
commit 48312272ad
2 changed files with 4 additions and 1 deletions

View File

@ -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;

View File

@ -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 |