Content deleted Content added
convenience module for using wikitable markup inside templates |
This is not Code golf; deobfuscate code |
||
(One intermediate revision by one other user not shown) | |||
Line 1:
local p = {};
return {▼
local getArgs = require('Module:Arguments').getArgs
function p.main(frame)
for k, v in pairs(args) do▼
local args = getArgs(frame, {removeBlanks=false, trim=false} )
if type(k) ~= 'number' then buffer:_(string.format(' %s="%s"', k, v)) end▼
end▼
▲
buffer:_'\n'▼
for _, v in ipairs(args) do▼
if not string.match(v, '^!') then buffer:_'|' end▼
buffer:_(v)▼
end▼
return table.concat(buffer:_'\n|}')▼
end
|