Content deleted Content added
sync |
use require('strict') instead of require('Module:No globals') |
||
(3 intermediate revisions by 2 users not shown) | |||
Line 1:
require('strict')
return setmetatable({}, {
__index = function(t, k)
Line 6 ⟶ 7:
end
return function(frame)
local fargsused = { tag = true, onerror = true }
local args = {}
local str_i = 1
while
args[str_i] = fargs['s' .. str_i]
str_i = str_i + 1
end
for i, v in ipairs(
fargsused[i] = true
args[i + str_i - 1] = tonumber(v) or v:gsub("^\\", "", 1)
end
local result = nil
▲ if not frame.args.tag then
if fargs.onerror then
local success
return (what(unpack(args)))▼
success, result = pcall(what, unpack(args))
if not success then
return fargs.onerror
end
else
end
if not fargs.tag then
return result
end
local tagargs = {}
for x, y in pairs(
if
end
return frame:extensionTag{name =
end
end
|