Content deleted Content added
to consolidate common function to Module:LuaCall, for ease to maintain bug fix and improvement. Some bug fixes and improvements has been done there but not yet here. One of common functions like tostringOrNumber() will also be shared there. This is not proxying, but to share common code with other modules. |
m Changed protection settings for "Module:Ustring": Used by fully protected Template:Str rightc -> Template:New page DYM -> Template:No article text (-> WP:CASC) ([Edit=Require administrator access] (indefinite)) |
||
(11 intermediate revisions by 6 users not shown) | |||
Line 1:
require('strict')
return setmetatable({}, {
for k, v in pairs(p) do▼
local what = mw.ustring[k]
▲ p[k] = function(frame)
if type(what) ~= "function" then
local args = frame.args▼
--for _, v in ipairs(args) do▼
-- args[_] = tonumber(v) or v:gsub("^\\", "", 1)▼
▲ --end
if args.tag then▼
local
local args = {}
local str_i = 1
while fargs['s' .. str_i] do
fargsused['s' .. str_i] = true
args[str_i] = fargs['s' .. str_i]
str_i = str_i + 1
end▼
fargsused[i] = true
end
return (what(unpack(args))) -- Outside parens truncate to first result avoiding tail call
end
local tagargs = {}
if not fargsused[x] then tagargs[x] = y end
end
return frame:extensionTag
end
▲ return (v(frame))
end
})
▲end
▲return p
|