1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-07-05 11:43:16 +00:00
TiddlyWiki5/core/modules/filters/transcludes.js
lin onetwo 741aef55e4
Fix: transcludes and backtranscludes operators to always include self-referential transclusion (#8257)
* fix: ignore self-referential transclusion

* feat: support old <$transclude tiddler param

* fix: restore old behavior: include itself like backlinks[]

* refactor: use LinkedList in transcludes[] and backtranscludes[]

* fix: only fallback to title when {{!!xxx}}, not when input is empty

* refactor: move transcludes ast extractor to a file

* refactor: move links ast extractor to a file

* Revert "refactor: move links ast extractor to a file"

This reverts commit 5600a00cd8.

* Revert "refactor: move transcludes ast extractor to a file"

This reverts commit 61d5484f09.

* lint: use pushTop and remove space
2024-06-19 09:38:02 +01:00

27 lines
564 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.makeTiddlerIterator(options.wiki);
};
})();