mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-12-24 17:10:29 +00:00
Fix the execution context for widget attributes specified as macros
We need to ensure that variables in the tree up to this point are accessible when we render the macro text.
This commit is contained in:
parent
439dfcb172
commit
4a5a8dd773
@ -218,7 +218,7 @@ Widget.prototype.computeAttributes = function() {
|
|||||||
value = self.wiki.getTextReference(attribute.textReference,"",self.getVariable("currentTiddler"));
|
value = self.wiki.getTextReference(attribute.textReference,"",self.getVariable("currentTiddler"));
|
||||||
} else if(attribute.type === "macro") {
|
} else if(attribute.type === "macro") {
|
||||||
var text = self.getVariable(attribute.value.name,{params: attribute.value.params});
|
var text = self.getVariable(attribute.value.name,{params: attribute.value.params});
|
||||||
value = self.wiki.renderText("text/plain","text/vnd.tiddlywiki",text);
|
value = self.wiki.renderText("text/plain","text/vnd.tiddlywiki",text,{parentWidget: this});
|
||||||
} else { // String attribute
|
} else { // String attribute
|
||||||
value = attribute.value;
|
value = attribute.value;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user