1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2025-11-03 17:13:05 +00:00

Use the setvariable widget instead of macrodef

setvariable is more general
This commit is contained in:
Jeremy Ruston
2013-10-13 23:40:11 +01:00
parent 942e463b20
commit cc4940f41f
3 changed files with 6 additions and 56 deletions

View File

@@ -641,6 +641,11 @@ var tweakParseTreeNodes = function(nodeList) {
var tweakMacroDefinition = function(nodeList) {
if(nodeList && nodeList[0] && nodeList[0].type === "macrodef") {
nodeList[0].type = "setvariable";
nodeList[0].attributes = {
name: {type: "string", value: nodeList[0].name},
value: {type: "string", value: nodeList[0].text}
};
nodeList[0].children = nodeList.slice(1);
nodeList.splice(1,nodeList.length-1);
tweakMacroDefinition(nodeList.children);