3,726
edits
MusikAnimal (talk | contribs) No edit summary |
MusikAnimal (talk | contribs) No edit summary |
||
Line 376: | Line 376: | ||
local results = p._query(args) | local results = p._query(args) | ||
local root = mw.html.create('div') | local root = mw.html.create('div') | ||
root:tag('code'):wikitext( | |||
local function dump(o) | |||
if type(o) == 'table' then | |||
local s = '{ ' | |||
for k,v in pairs(o) do | |||
if type(k) ~= 'number' then k = '"'..k..'"' end | |||
s = s .. '['..k..'] = ' .. dump(v) .. ',' | |||
end | |||
return s .. '} ' | |||
else | |||
return tostring(o) | |||
end | |||
end | |||
root:tag('code'):wikitext(dump(args)) | |||
local title = 'Results' | local title = 'Results' |