Module:No-1s limits: Difference between revisions

ArrowHead294 (talk | contribs)
m Sort dependencies
ArrowHead294 (talk | contribs)
mNo edit summary
Line 294: Line 294:
end
end


function p.for_small_edos (frame)
function p.for_small_edos(frame)
local lines = tonumber (frame.args['lines'])
local liners = tonumber(frame.args['lines'])
local debugg = yesno(frame.args['debug'])
local t_body = {}
local t_body = {}
local val = {}
local val = {}
for i = 1, lines do
for i = 1, liners do
local et = ET.parse('' .. i .. 'edo')
local et = ET.parse('' .. i .. 'edo')
local limit = p.consistency_limit(et, false, 43)
local limit = p.consistency_limit(et, false, 43)
local vals = p.vals(et, limit)
local vals = p.vals(et, limit)
t_body[i] = string.format ("|-\n| %s\n| %s\n| %s", i, limit, vals)
t_body[i] = string.format("|-\n| %s\n| %s\n| %s", i, limit, vals)
end
end


return "{| class=\"wikitable center-all mw-collapsible mw-collapsed\"\n" ..
local result = "{| class=\"wikitable center-all mw-collapsible mw-collapsed\"\n" ..
"|-\n" ..
"|-\n" ..
"! EDO\n" ..
"! EDO\n" ..
"! No-1s consistency limit\n" ..
"! No-1s consistency limit\n" ..
"! Associated vals\n" ..
"! Associated vals\n" ..
table.concat (t_body, "\n") ..
table.concat(t_body, "\n") ..
"\n|}"
"\n|}"
if debugg == true then
result = "<syntaxhighlight lang=\"wikitext\">" .. result .. "</syntaxhighlight>"
end
return frame:preprocess(result)
end
end


return p
return p