mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-02-03 20:59:09 +00:00
Reuse attribute objects when executing custom widgets
This commit is contained in:
parent
0163c04b7d
commit
8f69c27632
@ -440,15 +440,10 @@ Widget.prototype.makeChildWidget = function(parseTreeNode,options) {
|
||||
}
|
||||
]
|
||||
};
|
||||
$tw.utils.each(parseTreeNode.attributes,function(attr) {
|
||||
$tw.utils.each(parseTreeNode.attributes,function(attr,name) {
|
||||
// If the attribute starts with a dollar then add an extra dollar so that it doesn't clash with the $xxx attributes of transclude
|
||||
var name = attr.name.charAt(0) === "$" ? "$" + attr.name : attr.name,
|
||||
newAttr = {
|
||||
name: name,
|
||||
type: attr.type,
|
||||
value: attr.value
|
||||
};
|
||||
newParseTreeNode.attributes[name] = newAttr;
|
||||
name = name.charAt(0) === "$" ? "$" + name : name;
|
||||
newParseTreeNode.attributes[name] = attr;
|
||||
});
|
||||
parseTreeNode = newParseTreeNode;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user