From 853cca906cf5b721f8a54576af380c40429e1c3e Mon Sep 17 00:00:00 2001 From: Stephan Hradek Date: Wed, 11 Dec 2013 22:59:52 +0100 Subject: [PATCH] allowing variable number of arguments for non-argument macros --- core/modules/widgets/widget.js | 47 +++++++++++++++++++--------------- 1 file changed, 26 insertions(+), 21 deletions(-) diff --git a/core/modules/widgets/widget.js b/core/modules/widgets/widget.js index 481df4769..8d9da80e3 100755 --- a/core/modules/widgets/widget.js +++ b/core/modules/widgets/widget.js @@ -143,29 +143,34 @@ Widget.prototype.evaluateMacroModule = function(name,actualParams,defaultValue) if($tw.utils.hop($tw.macros,name)) { var macro = $tw.macros[name], args = []; - var nextAnonParameter = 0, // Next candidate anonymous parameter in macro call - paramInfo, paramValue; - // Step through each of the parameters in the macro definition - for(var p=0; p 0) { + var nextAnonParameter = 0, // Next candidate anonymous parameter in macro call + paramInfo, paramValue; + // Step through each of the parameters in the macro definition + for(var p=0; p