Difference between revisions of "Module:TNT"

Jump to navigation Jump to search
insert positional parameters into params in the order of their keys, not the order in which pairs(frame.args) happens to encounter them
en>Erutuon
(use ipairs to guarantee iteration over integer keys starting at 1 (pairs happens to iterate that way very often, but a case where it does not has been reported on the talk page))
en>Erutuon
(insert positional parameters into params in the order of their keys, not the order in which pairs(frame.args) happens to encounter them)
Line 50: Line 50:
id = mw.text.trim(v)
id = mw.text.trim(v)
elseif type(k) == 'number' then
elseif type(k) == 'number' then
table.insert(params, mw.text.trim(v))
params[k - 2] = mw.text.trim(v)
elseif k == 'lang' and v ~= '_' then
elseif k == 'lang' and v ~= '_' then
lang = mw.text.trim(v)
lang = mw.text.trim(v)
Anonymous user

Navigation menu