1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-20 00:34:50 +00:00

Fixed problem with specifying positional parameters by name

This commit is contained in:
Jeremy Ruston 2012-02-22 21:39:08 +00:00
parent bf6f5e0254
commit 6a0f2006bf

View File

@ -136,10 +136,10 @@ var parseMacroParams = function(w,name,paramString) {
for(var m in macro.params) {
var param = macro.params[m],
arg;
if("byPos" in param && args.byPos[param.byPos]) {
if("byPos" in param && args.byPos[param.byPos] && (args.byPos[param.byPos].n === "anon" || args.byPos[param.byPos].n === m)) {
arg = args.byPos[param.byPos].v;
insertParam(param,m,arg);
} else if("byName" in param) {
} else {
arg = args.getValueByName(m);
if(!arg && param.byName === "default") {
arg = args.getValueByName("anon");