Line 57:
Line 57:
function Utils.getContext(frame)
function Utils.getContext(frame)
local parentFrame = frame:getParent()
local parentFrame = frame:getParent()
−
local args = getArgs{frame = parentFrame}
+
return { pagename = parentFrame:getTitle(), args = getArgs{ frame = parentFrame } }
−
args.pagename = parentFrame:getTitle()
−
return args
end
end
function Utils.test_context(frame)
function Utils.test_context(frame)
local context = Utils.getContext(frame)
local context = Utils.getContext(frame)
−
return "arg = " .. (context.arg or "?") .. " @ " .. (context.pagename or "?")
+
return "arg = " .. (context.args.arg or "?") .. " @ " .. (context.pagename or "?")
end
end
return Utils
return Utils