mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2026-09-29 20:51:43 +00:00
fix: macro in widget param
This commit is contained in:
@@ -405,8 +405,15 @@ exports.serializeAttribute = function(node) {
|
||||
} else if(node.type === "substituted") {
|
||||
attributeString += "=`" + node.rawValue + "`";
|
||||
} else if(node.type === "macro") {
|
||||
// Assuming macro serialization is complex and handled elsewhere
|
||||
attributeString += "=" + node.value.serialize();
|
||||
if(node.value && typeof node.value === "object" && node.value.type === "macrocall") {
|
||||
var params = node.value.params.map(function(param) {
|
||||
return param.value;
|
||||
}).join(" ");
|
||||
attributeString += "=<<" + node.value.name + " " + params + ">>";
|
||||
} else {
|
||||
// Unsupported macro structure
|
||||
return null;
|
||||
}
|
||||
} else {
|
||||
// Unsupported type
|
||||
return null;
|
||||
|
||||
Reference in New Issue
Block a user