From a65713650e8b46802d4509ba41eb139b29b9cb1c Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Wed, 7 Mar 2012 17:42:41 +0000 Subject: [PATCH] Fixed macro execution in renderTiddler and renderMacro --- js/WikiStore.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/js/WikiStore.js b/js/WikiStore.js index faadb33c0..012af1ab4 100755 --- a/js/WikiStore.js +++ b/js/WikiStore.js @@ -292,7 +292,9 @@ WikiStore.prototype.renderTiddler = function(targetType,tiddlerTitle,templateTit {target: tiddlerTitle, template: templateTitle}, null, this); - macro.execute(); + // Execute the macro + macro.execute([],this.getTiddler(tiddlerTitle)); + // Render it return macro.render(targetType); }; @@ -300,9 +302,9 @@ WikiStore.prototype.installMacro = function(macro) { this.macros[macro.name] = macro; }; -WikiStore.prototype.renderMacro = function(macroName,params,children,tiddler) { +WikiStore.prototype.renderMacro = function(macroName,params,children,tiddlerTitle) { var macro = Renderer.MacroNode(macroName,params,children,this); - macro.execute([],tiddler); + macro.execute([],this.getTiddler(tiddlerTitle)); return macro; };