Module:Tabber: Difference between revisions
Jump to navigation
Jump to search
jj>KojoBailey mNo edit summary |
Revo admin (talk | contribs) m (1 revision imported) |
(No difference)
|
Latest revision as of 21:47, 5 November 2024
Documentation for this module may be created at Module:Tabber/doc
local p = {}
function getArgCount(args)
local count = 0
for _ in ipairs(args) do
count = count + 1
end
return count
end
function p.main(frame)
local parentArgs = frame:getParent().args
local content = ""
for i = 1, getArgCount(parentArgs), 2 do
if parentArgs[i] and parentArgs[i] ~= "" then
if i ~= 1 then
content = content .. "|-|"
end
content = content .. parentArgs[i] .. "=" .. ( parentArgs[i+1] or "" )
end
end
return frame:extensionTag('tabber', content)
end
return p