diff --git a/core/modules/widgets/let.js b/core/modules/widgets/let.js index 5c4b3aa90..afd3a2f20 100644 --- a/core/modules/widgets/let.js +++ b/core/modules/widgets/let.js @@ -51,11 +51,9 @@ LetWidget.prototype.computeAttributes = function() { $tw.utils.each($tw.utils.getOrderedAttributesFromParseTreeNode(this.parseTreeNode),function(attribute) { var value = self.computeAttribute(attribute), name = attribute.name; - if(name.charAt(0) !== "$") { - // Now that it's prepped, we're allowed to look this variable up - // when defining later variables - self.currentValueFor[name] = value; - } + // Now that it's prepped, we're allowed to look this variable up + // when defining later variables + self.currentValueFor[name] = value; }); // Run through again, setting variables and looking for differences $tw.utils.each(this.currentValueFor,function(value,name) { diff --git a/editions/tw5.com/tiddlers/widgets/LetWidget.tid b/editions/tw5.com/tiddlers/widgets/LetWidget.tid index 2d2b73338..63c4904c7 100644 --- a/editions/tw5.com/tiddlers/widgets/LetWidget.tid +++ b/editions/tw5.com/tiddlers/widgets/LetWidget.tid @@ -1,5 +1,6 @@ title: LetWidget -created: 20211028115900000 +created: 20220502144738010 +modified: 20220502144738010 tags: Widgets caption: let @@ -12,7 +13,9 @@ caption: let The content of the <<.wid let>> widget is the scope for the value assigned to the variable. |!Attribute |!Description | -|//{attributes not starting with $}// |Each attribute name specifies a variable name. The attribute value is assigned to the variable | +|//{any attributes}// |Each attribute name specifies a variable name. The attribute value is assigned to the variable | + +<<.from-version "5.2.3">> Previously, variable names were restricted to not start with a dollar sign. That restriction is no longer applied. Attributes are evaluated in the order they are written. Attributes with the same name are allowed. Each time a duplicate attribute is encountered, it will replace the existing value set by the earlier duplicate.