local getArgs = require('Module:Arguments').getArgslocal p =
local function substituteArgs(frame, code, argstosub) local result = code = mw.text.unstripNoWiki(code) local actualCode = code for key, value in pairs(argstosub) do code = code:gsub("", mw.ustring.gsub(value, "([%(%)%.%%%+%-%*%?%[%^%$%]])", "%%%1")) end actualCode = frame:preprocess(actualCode) return actualCodeend
function p.main(frame) local args = getArgs(frame) local code = args.code local argstosub = for key, value in pairs(args) do argstosub[key] = value end
return substituteArgs(frame, code, argstosub)end
return p