1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-10-02 00:40:47 +00:00

Fix to transclusion viewer

This commit is contained in:
Jeremy Ruston 2012-10-18 18:59:57 +01:00
parent 971bc68163
commit f4f042d2be

View File

@ -15,12 +15,12 @@ A viewer that transcludes the tiddler whose title is specified in the viewed fie
function renderValue(tiddler,field,value,viewMacro) {
if(tiddler && viewMacro.params.field && (viewMacro.params.field in tiddler.fields)) {
var children = viewMacro.wiki.parseTiddler(tiddler.fields[viewMacro.params.field]).tree,
childrenClone = [];
childrenClone = [],t;
for(t=0; t<children.length; t++) {
childrenClone.push(children[t].clone());
}
for(t=0; t<childrenClone.length; t++) {
childrenClone[t].execute(parents,viewMacro.tiddlerTitle);
childrenClone[t].execute(viewMacro.parents,viewMacro.tiddlerTitle);
}
return $tw.Tree.Element(viewMacro.isBlock ? "div" : "span",{},childrenClone);
}