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:
parent
ed6a63a925
commit
30dae0c60d
@ -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);
|
||||
};
|
||||
|
||||
})();
|
||||
|
@ -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);
|
||||
};
|
||||
|
||||
})();
|
||||
|
Loading…
x
Reference in New Issue
Block a user