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
532 B
JavaScript
27 lines
532 B
JavaScript
/*\
|
|
title: $:/core/modules/filters/backtranscludes.js
|
|
type: application/javascript
|
|
module-type: filteroperator
|
|
|
|
Filter operator for returning all the backtranscludes from a tiddler
|
|
|
|
\*/
|
|
(function(){
|
|
|
|
/*jslint node: true, browser: true */
|
|
/*global $tw: false */
|
|
"use strict";
|
|
|
|
/*
|
|
Export our filter function
|
|
*/
|
|
exports.backtranscludes = function(source,operator,options) {
|
|
var results = [];
|
|
source(function(tiddler,title) {
|
|
$tw.utils.pushTop(results,options.wiki.getTiddlerBacktranscludes(title));
|
|
});
|
|
return results;
|
|
};
|
|
|
|
})();
|