1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-03-13 23:18:09 +00:00

Fixes for tags macro

This commit is contained in:
Jeremy Ruston 2012-06-13 09:10:50 +01:00
parent 2b9b9a41b0
commit 0641685fc8

View File

@ -27,7 +27,8 @@ exports.info = {
exports.executeMacro = function() {
var tiddler = this.wiki.getTiddler(this.tiddlerTitle),
child = $tw.Tree.Element("div",{"class":"tw-tags-wrapper"},[]);
child = $tw.Tree.Element("div",{"class":"tw-tags-wrapper"},[]),
parents = this.parents.slice(0);
if(tiddler && tiddler.fields.tags) {
for(var t=0; t<tiddler.fields.tags.length; t++) {
var tag = tiddler.fields.tags[t];
@ -38,7 +39,8 @@ exports.executeMacro = function() {
}));
}
}
child.execute(this.parents,this.tiddlerTitle);
parents.push(this.tiddlerTitle);
child.execute(parents,this.tiddlerTitle);
return child;
};