1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-09-29 15:30:47 +00:00

Adjust the parent stack for transclusion

This enables the dropdowns to work a bit better
This commit is contained in:
Jeremy Ruston 2012-06-19 10:59:58 +01:00
parent cabc11d517
commit 1963c56fa9

View File

@ -26,7 +26,8 @@ exports.info = {
exports.executeMacro = function() {
var titles,templateTiddler,templateText,t,title,templateParseTree,
nodes,node,c,
parents = this.parents;
parents = this.parents.slice(0);
parents.push(this.tiddlerTitle);
// Get the tiddlers we're transcluding
if(this.hasParameter("filter")) {
titles = this.wiki.filterTiddlers(this.params.filter,this.tiddlerTitle);
@ -44,8 +45,7 @@ exports.executeMacro = function() {
// Check for recursion
if(parents.indexOf(this.params.templateTitle) !== -1) {
return $tw.Tree.errorNode("Tiddler recursion error in <<transclude>> macro");
}
parents = parents.slice(0);
}
parents.push(this.params.templateTitle);
templateParseTree = this.wiki.parseTiddler(this.params.templateTitle);
} else {