1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-02-28 08:50:01 +00:00

refactor: use LinkedList in transcludes[] and backtranscludes[]

This commit is contained in:
lin onetwo 2024-06-17 17:12:03 +08:00
parent ed6a63a925
commit 30dae0c60d
2 changed files with 4 additions and 4 deletions

View File

@ -16,11 +16,11 @@ Filter operator for returning all the backtranscludes from a tiddler
Export our filter function
*/
exports.backtranscludes = function(source,operator,options) {
var results = [];
var results = new $tw.utils.LinkedList();
source(function(tiddler,title) {
$tw.utils.pushTop(results,options.wiki.getTiddlerBacktranscludes(title));
results.pushTop(options.wiki.getTiddlerBacktranscludes(title));
});
return results;
return results.makeTiddlerIterator(options.wiki);
};
})();

View File

@ -20,7 +20,7 @@ exports.transcludes = function(source,operator,options) {
source(function(tiddler,title) {
results.pushTop(options.wiki.getTiddlerTranscludes(title));
});
return results.toArray();
return results.makeTiddlerIterator(options.wiki);
};
})();