1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-16 14:54:51 +00:00

Change backlinks to use LinkedList (#6050)

This commit is contained in:
Cameron Fischer 2021-09-19 14:58:45 -04:00 committed by GitHub
parent fb4d77ef46
commit 157afda2fc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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