Module:Infobox: रिवीजन सभ के बीचा में अंतर

Content deleted Content added
shorter variable name for what is a pretty simple role, really
custom step degree for touchParameters
लाइन 249:
end
 
-- This function parses the parameters with the given prefixes, in order, in batches of 20the step size specified.
-- If the step size is not given, the default is 20.
local function touchParameters(prefixTable, origArgs, step)
if type(prefixTable) ~= 'table' or type(origArgs) ~= 'table' then
error("Invalid input to the touchParameters function detected. Both parameters must be tables.", 2)
end
if step and type(step) ~= 'number' then
error("Non-numerical step value detected.", 2)
end
step = step or 20
local temp
local a = 1
Line 265 ⟶ 271:
while moreArgumentsExist == true do
moreArgumentsExist = false
for i = a, a +19 step - 1 do
for j,v in ipairs(prefixTable) do
temp = origArgs[v .. tostring(i)]
Line 273 ⟶ 279:
end
end
a = a + 20step
end
end
Line 292 ⟶ 298:
temp = origArgs.title
temp = origArgs.above
touchParameters({'subheader'}, origArgs, 5)
touchParameters({'image', 'caption'}, origArgs, 5)
touchParameters({'header', 'label', 'data'}, origArgs, 20)
temp = origArgs.below
"https://bh.wikipedia.org/wiki/Module:Infobox" से लिहल गइल