mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2025-01-11 18:00:26 +00:00
Fixed problem with specifying positional parameters by name
This commit is contained in:
parent
bf6f5e0254
commit
6a0f2006bf
@ -136,10 +136,10 @@ var parseMacroParams = function(w,name,paramString) {
|
|||||||
for(var m in macro.params) {
|
for(var m in macro.params) {
|
||||||
var param = macro.params[m],
|
var param = macro.params[m],
|
||||||
arg;
|
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;
|
arg = args.byPos[param.byPos].v;
|
||||||
insertParam(param,m,arg);
|
insertParam(param,m,arg);
|
||||||
} else if("byName" in param) {
|
} else {
|
||||||
arg = args.getValueByName(m);
|
arg = args.getValueByName(m);
|
||||||
if(!arg && param.byName === "default") {
|
if(!arg && param.byName === "default") {
|
||||||
arg = args.getValueByName("anon");
|
arg = args.getValueByName("anon");
|
||||||
|
Loading…
Reference in New Issue
Block a user