mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-09-18 10:19:44 +00:00
741aef55e4
* 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 commit5600a00cd8
. * Revert "refactor: move transcludes ast extractor to a file" This reverts commit61d5484f09
. * lint: use pushTop and remove space
27 lines
564 B
JavaScript
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);
|
|
};
|
|
|
|
})();
|