Module:Wikitable: Difference between revisions

From The Global Wiki
Jump to navigation Jump to search
en>Pppery
(This is not Code golf; deobfuscate code)
 
en>Johand199
m (Reverted edits by 186.96.209.113 (talk): page blanking (HG) (3.4.10))
Line 1: Line 1:
local p = {};
{{#invoke:wikitable|main}}<noinclude>{{documentation}}</noinclude>
local getArgs = require('Module:Arguments').getArgs
local buffer = require("Module:Buffer")('{|')
function p.main(frame)
local args =  getArgs(frame, {removeBlanks=false, trim=false} )
for k, v in pairs(args) do
if type(k) ~= 'number' then buffer:_(string.format(string.match(v, '^["\']') and ' %s=%s' or ' %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
return p;

Revision as of 21:54, 27 September 2020

Script error: No such module "wikitable".