1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-16 23:04:50 +00:00

Don't worry about ordered attributes

The changes in 0bffae2108 mean that we don't need to explicitly maintain the ordered attributes
This commit is contained in:
jeremy@jermolene.com 2022-04-26 14:05:56 +01:00
parent 7299d4fd1d
commit 35616a0b39

View File

@ -409,9 +409,7 @@ Widget.prototype.makeChildWidget = function(parseTreeNode,options) {
} }
] ]
}; };
newParseTreeNode.orderedAttributes = [newParseTreeNode.attributes["$variable"]]; $tw.utils.each(parseTreeNode.attributes,function(attr) {
newParseTreeNode.children[0].orderedAttributes = [newParseTreeNode.children[0].attributes["$name"]];
$tw.utils.each(parseTreeNode.orderedAttributes,function(attr) {
// If the attribute starts with a dollar then add an extra dollar so that it doesn't clash with the $xxx attributes of ubertransclude // If the attribute starts with a dollar then add an extra dollar so that it doesn't clash with the $xxx attributes of ubertransclude
var name = attr.name.charAt(0) === "$" ? "$" + attr.name : attr.name, var name = attr.name.charAt(0) === "$" ? "$" + attr.name : attr.name,
newAttr = { newAttr = {
@ -420,7 +418,6 @@ Widget.prototype.makeChildWidget = function(parseTreeNode,options) {
value: attr.value value: attr.value
}; };
newParseTreeNode.attributes[name] = newAttr; newParseTreeNode.attributes[name] = newAttr;
newParseTreeNode.orderedAttributes.push(newAttr);
}); });
parseTreeNode = newParseTreeNode; parseTreeNode = newParseTreeNode;
} }