Module:Citation/CS1/Identifiers: Difference between revisions

    (sync from sandbox;)
    No edit summary
    Line 1,366: Line 1,366:
    local id_list = {}; -- list of identifiers found in args
    local id_list = {}; -- list of identifiers found in args
    for k, v in pairs( cfg.id_handlers ) do -- k is uppercase identifier name as index to cfg.id_handlers; e.g. cfg.id_handlers['ISBN'], v is a table
    for k, v in pairs( cfg.id_handlers ) do -- k is uppercase identifier name as index to cfg.id_handlers; e.g. cfg.id_handlers['ISBN'], v is a table
    v = select_one( args, v.parameters, 'redundant_parameters' ); -- v.parameters is a table of aliases for k; here we pick one from args if present
    v = select_one( args, v.parameters, 'err_redundant_parameters' ); -- v.parameters is a table of aliases for k; here we pick one from args if present
    if is_set(v) then id_list[k] = v; end -- if found in args, add identifier to our list
    if is_set(v) then id_list[k] = v; end -- if found in args, add identifier to our list
    end
    end