Difference between revisions of "Module:TNT"

6 bytes removed ,  17:31, 9 June 2021
insert positional parameters into params in the order of their keys, not the order in which pairs(frame.args) happens to encounter them
>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))
>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