Module:Infobox: Difference between revisions

disallow zero-numbered row parameters
m>Mr. Stradivarius
(add tracking category per main template)
m>Mr. Stradivarius
(disallow zero-numbered row parameters)
Line 29: Line 29:
     local nums = {}
     local nums = {}
     for k, v in pairs(args) do
     for k, v in pairs(args) do
         local num = ('' .. k):match('^' .. prefix .. '(%d+)$')
         local num = ('' .. k):match('^' .. prefix .. '([1-9]%d*)$')
         if num then table.insert(nums, tonumber(num)) end
         if num then table.insert(nums, tonumber(num)) end
     end
     end
Anonymous user