mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-18 18:29:42 +00:00
36fc8170a4
* feat: add transcludes and backtranscludes filter and its relying indexer * feat: add test about backtranscludes * docs: add doc about transcludes and backtranscludes Operator * refactor: merge backlinks and backtranscludes indexer * fix: test not executed * fix: latest transclude use $tiddler instead of tiddler * feat: A tiddler transclude with template will still use the tiddler as result. * docs: wrong comment
27 lines
540 B
JavaScript
27 lines
540 B
JavaScript
/*\
|
|
title: $:/core/modules/filters/transcludes.js
|
|
type: application/javascript
|
|
module-type: filteroperator
|
|
|
|
Filter operator for returning all the transcludes from a tiddler
|
|
|
|
\*/
|
|
(function(){
|
|
|
|
/*jslint node: true, browser: true */
|
|
/*global $tw: false */
|
|
"use strict";
|
|
|
|
/*
|
|
Export our filter function
|
|
*/
|
|
exports.transcludes = function(source,operator,options) {
|
|
var results = new $tw.utils.LinkedList();
|
|
source(function(tiddler,title) {
|
|
results.pushTop(options.wiki.getTiddlerTranscludes(title));
|
|
});
|
|
return results.toArray();
|
|
};
|
|
|
|
})();
|