"ମଡ୍ୟୁଲ:Citation/CS1" ପୃଷ୍ଠାର ସଂସ୍କରଣ‌ଗୁଡ଼ିକ ମଧ୍ୟରେ ତଫାତ

Content deleted Content added
No edit summary
ଟିକେ deprecated enumerated parameter error message fix;
୩,୮୩୬ କ ଧାଡ଼ି:
local function validate (name, cite_class, empty)
local name = tostring (name);
local enum_name; -- for enumerated parameters, is name with enumerator replaced with '#'
local state;
local function state_test (state, name) -- local function to do testing of state values
Line ୩,୮୫୯ ⟶ ୩,୮୬୦:
 
-- limited enumerated parameters list
nameenum_name = name:gsub("%d+", "#" ); -- replace digit(s) with # (last25 becomes last#) (mw.ustring because non-Western 'local' digits)
state = whitelist.limited_numbered_arguments[nameenum_name];
if true == state_test (state, name) then return true; end
 
Line ୩,୮୭୫ ⟶ ୩,୮୭୬:
 
-- all enumerated parameters allowed
nameenum_name = name:gsub("%d+", "#" ); -- replace digit(s) with # (last25 becomes last#) (mw.ustring because non-Western 'local' digits)
state = whitelist.numbered_arguments[nameenum_name];
if true == state_test (state, name) then return true; end
 
Line ୪,୦୫୫ ⟶ ୪,୦୫୬:
elseif not utilities.is_set (v) then -- for empty parameters
if not validate (k, config.CitationClass, true) then -- is this empty parameter a valid parameter
k = ('' == k) and k:gsub ('^$', '(empty string)') or k; -- when k is empty string (or was space(s) trimmed to empty string), replace with descriptive text
table.insert (empty_unknowns, utilities.wrap_style ('parameter', k)); -- format for error message and add to the list
end