Changes
require Module:Template invocation only if required (see Template talk:Post-nominals#Use of Module:Template_invocation); clean whitespace, variables
local getArgs = require('Module:Arguments').getArgs
local yesno = require('Module:Yesno')
local makeTemplate = require('Module:Template invocation').invocationp = {}
function p.main(frame)
local result = ''
local addSeparator = false;
for i_, v in ipairs(variableVals) do v = mw.text.trim(v) -- trim whitespace
if #v > 0 or not yesno(args.skipBlanks) then
if addSeparator then
result = result .. output
else
local makeTemplate = require('Module:Template invocation').invocation
result = result .. makeTemplate(template, targs)
end
error("Both start/stop/by and numbered parameters specified")
end
local start = tonumber(args.start or 1) local stop = tonumber(args.stop or 1) local by = tonumber(args.by or 1) for i = start, stop, by do
variableVals [#variableVals + 1] = i
end
local nums = {}
local pattern = '^' .. prefix .. '([1-9]%d*)' .. suffix .. '$'
for k, v _ in pairs(args) do
local num = tostring(k):match(pattern)
if num then