mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-19 08:14:50 +00:00
Fix for multiple macro parameters
This is one situation where the assignment to undefined matters
This commit is contained in:
parent
bede162896
commit
36290c14fa
@ -47,7 +47,7 @@ MacroCallRenderer.prototype.substituteParameters = function(text,macroCallParseT
|
|||||||
for(var p=0; p<macroDefinition.params.length; p++) {
|
for(var p=0; p<macroDefinition.params.length; p++) {
|
||||||
// Check if we've got a macro call parameter with the same name
|
// Check if we've got a macro call parameter with the same name
|
||||||
var paramInfo = macroDefinition.params[p],
|
var paramInfo = macroDefinition.params[p],
|
||||||
paramValue;
|
paramValue = undefined;
|
||||||
for(var m=0; m<macroCallParseTreeNode.params.length; m++) {
|
for(var m=0; m<macroCallParseTreeNode.params.length; m++) {
|
||||||
if(macroCallParseTreeNode.params[m].name === paramInfo.name) {
|
if(macroCallParseTreeNode.params[m].name === paramInfo.name) {
|
||||||
paramValue = macroCallParseTreeNode.params[m].value;
|
paramValue = macroCallParseTreeNode.params[m].value;
|
||||||
@ -83,7 +83,7 @@ MacroCallRenderer.prototype.render = function(type) {
|
|||||||
|
|
||||||
MacroCallRenderer.prototype.renderInDom = function() {
|
MacroCallRenderer.prototype.renderInDom = function() {
|
||||||
// Create the element
|
// Create the element
|
||||||
this.domNode = document.createElement("macrocall");
|
this.domNode = document.createElement("div");
|
||||||
this.domNode.setAttribute("data-macro-name",this.parseTreeNode.name);
|
this.domNode.setAttribute("data-macro-name",this.parseTreeNode.name);
|
||||||
// Render any child nodes
|
// Render any child nodes
|
||||||
var self = this;
|
var self = this;
|
||||||
|
Loading…
Reference in New Issue
Block a user