From 4a5a8dd773355d85ad9842e704e2bc053afe1807 Mon Sep 17 00:00:00 2001 From: Jermolene Date: Tue, 12 Nov 2013 19:52:17 +0000 Subject: [PATCH] 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. --- core/modules/widgets/widget.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/widgets/widget.js b/core/modules/widgets/widget.js index d65fcf002..f41325b82 100755 --- a/core/modules/widgets/widget.js +++ b/core/modules/widgets/widget.js @@ -218,7 +218,7 @@ Widget.prototype.computeAttributes = function() { value = self.wiki.getTextReference(attribute.textReference,"",self.getVariable("currentTiddler")); } else if(attribute.type === "macro") { 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 value = attribute.value; }