Content deleted Content added
try some performance tweaks (although the old version looked pretty fast too) |
partial undo - you can't pass the arguments directly to the other table directly from the frame object, you need to use pairs() |
||
Line 6:
function p.testcase(frame)
local args = frame:getParent().args
local basepagename = mw.ustring.gsub(mw.title.getCurrentTitle().
local t = {}
for k, v in pairs(args) do
local res1 = frame:expandTemplate{ title = args['_template1'], args = args }▼
t[k] = v
local res2 = frame:expandTemplate{ title = args['_template2'], args = args }▼
end
return mw.ustring.format( [==[
Line 22 ⟶ 27:
%s</td><td>
%s</td></tr></table>]==],
res1,
res2
|