2013-05-25 16:26:22 +00:00
|
|
|
/*\
|
|
|
|
title: $:/core/modules/filters/links.js
|
|
|
|
type: application/javascript
|
|
|
|
module-type: filteroperator
|
|
|
|
|
|
|
|
Filter operator for returning all the links from a tiddler
|
|
|
|
|
|
|
|
\*/
|
|
|
|
(function(){
|
|
|
|
|
|
|
|
/*jslint node: true, browser: true */
|
|
|
|
/*global $tw: false */
|
|
|
|
"use strict";
|
|
|
|
|
|
|
|
/*
|
|
|
|
Export our filter function
|
|
|
|
*/
|
|
|
|
exports.links = function(source,operator,options) {
|
2021-01-05 17:36:18 +00:00
|
|
|
var results = new $tw.utils.LinkedList();
|
2014-04-03 19:49:16 +00:00
|
|
|
source(function(tiddler,title) {
|
2021-01-05 17:36:18 +00:00
|
|
|
results.pushTop(options.wiki.getTiddlerLinks(title));
|
2014-04-03 19:49:16 +00:00
|
|
|
});
|
2021-09-16 21:22:44 +00:00
|
|
|
return results.makeTiddlerIterator(options.wiki);
|
2013-05-25 16:26:22 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
})();
|