Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jermolene committed Mar 8, 2025
1 parent 1acef48 commit db1ed0e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion core/modules/filterrunprefixes/let.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,11 @@ exports.let = function(operationSubFunction,options) {
var name = options.suffixes[0][0];
// Return the filter run prefix function
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
var variables = {};
variables[name] = operationSubFunction(source,widget)[0] || "";
variables[name] = operationSubFunction(inputSource,widget)[0] || "";
// Clear the results
results.clear();
// Return the variables
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 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.

0 comments on commit db1ed0e

Please sign in to comment.