Module:Citation/CS1/Utilities/sandbox: Difference between revisions

Content deleted Content added
No edit summary
No edit summary
Line 272:
<sep_list_pair> - typically '<space>and<space>'
<sep_list_end> - typically '<comma><space>and<space>' or '<comma><space>&<space>'
 
defaults to cfg.presentation['sep_list'], cfg.presentation['sep_list_pair'], and cfg.presentation['sep_list_end']
if <sep_list_end> is specified, <sep_list> and <sep_list_pair> must also be supplied
 
]]
Line 277 ⟶ 280:
local function list_make (count, list_seq, sep_list, sep_list_pair, sep_list_end)
local list = '';
 
if not sep_list then -- set the defaults
sep_list = cfg.presentation['sep_list'];
sep_list_pair = cfg.presentation['sep_list_pair'];
sep_list_end = cfg.presentation['sep_list_end'];
end
if 2 >= count then
list = table.concat (list_seq, sep_list_pair); -- insert separator between two items; returns list_seq[1] then only one item
Line 286 ⟶ 296:
return list;
end
 
 
--[[--------------------------< S E L E C T _ O N E >----------------------------------------------------------
Line 335 ⟶ 346:
table.insert (error_list, wrap_style ('parameter', selected));
 
-- local error_str = list_make (#error_list, error_list, cfg.presentation['sep_list'], cfg.presentation['sep_list_pair'], cfg.presentation['sep_list_end']);
local error_str = list_make (#error_list, error_list);
 
-- error_str = error_str .. wrap_style ('parameter', selected);