Extend 'all' filter operator to select all source tiddlers

print-window-tiddler
Jermolene 2014-08-29 09:54:31 +01:00
rodzic 1b964873c4
commit 48312272ad
2 zmienionych plików z 4 dodań i 1 usunięć

Wyświetl plik

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

Wyświetl plik

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