mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-06-26 15:12:52 +00:00
Fix tests
This commit is contained in:
parent
1acef48a10
commit
db1ed0e66b
@ -20,9 +20,11 @@ exports.let = function(operationSubFunction,options) {
|
|||||||
var name = options.suffixes[0][0];
|
var name = options.suffixes[0][0];
|
||||||
// Return the filter run prefix function
|
// Return the filter run prefix function
|
||||||
return function(results,source,widget) {
|
return function(results,source,widget) {
|
||||||
|
// Set the input source to the incoming results
|
||||||
|
var inputSource = widget.wiki.makeTiddlerIterator(results.toArray());
|
||||||
// Assign the result of the subfunction to the variable
|
// Assign the result of the subfunction to the variable
|
||||||
var variables = {};
|
var variables = {};
|
||||||
variables[name] = operationSubFunction(source,widget)[0] || "";
|
variables[name] = operationSubFunction(inputSource,widget)[0] || "";
|
||||||
// Clear the results
|
// Clear the results
|
||||||
results.clear();
|
results.clear();
|
||||||
// Return the variables
|
// Return the variables
|
||||||
|
@ -20,4 +20,4 @@ type: text/vnd.tiddlywiki
|
|||||||
|
|
||||||
The `:let` filter run prefix assigns the first result of a filter run to a variable that is made available to the remaining [[filter runs|Filter Run]] in the [[filter expression|Filter Expression]]. If the filter run does not return any results then the variable is set to an empty string.
|
The `:let` filter run prefix assigns the first result of a filter run to a variable that is made available to the remaining [[filter runs|Filter Run]] in the [[filter expression|Filter Expression]]. If the filter run does not return any results then the variable is set to an empty string.
|
||||||
|
|
||||||
The output of the `:let` filter run prefix is an empty title list.
|
Within the filter run the [[all Operator]] with an empty parameter retrieves all the titles from the previous filter runs, instead of the usual behaviour of retieving all the titles that were passed to the filter expression.
|
Loading…
x
Reference in New Issue
Block a user