Module:Cs1 documentation support: Difference between revisions

no edit summary
m (1 revision imported: Templates and CSS files)
imported>Trappist the monk
No edit summary
 
Line 1,215: Line 1,215:
else
else
for param, param_t in pairs (json_t['params']) do
for param, param_t in pairs (json_t['params']) do
local param_i = param:gsub ('%d+', '#'); -- in case an enumerated parameter, convert the enumerate digits to a single '#' character
local param_i; -- this will be the parameter name that gets validated
if param:find ('[Ss]2[Cc][Ii][Dd]') then -- |s2cid*= parameters are not enumerated ...
param_i = param; -- ... so don't convert the '2' to '#'
else
param_i = param:gsub ('%d+', '#'); -- for enumerated parameters, convert the enumerator digits to a single '#' character; all others unmolested
end
 
local param_is_valid; -- boolean true when param is valid; nil else
local param_is_valid; -- boolean true when param is valid; nil else
if template_t[2] then -- if template is a preprint or uses unique parameters
if template_t[2] then -- if template is a preprint or uses unique parameters