Changes
Made author and editor scanning loops shorter for the common case of only one or two names.
local AuthorMask = args.authormask or args.authormask
local Authors = args.authors
local i
local a = {}
local last = args["last" .. i] or args["surname" .. i] or args["author" .. i]
if ( last ~= nil ) then
a[i].first = args["first" .. i] or args["given" .. i]
a[i].link = args["author" .. i .. "link"] or args["authorlink" .. i]
else
break
end
i = i + 1
end
if ( a[1] == nil ) then
local Coauthors = args.coauthor or args.coauthors
local Editors = args.editors
local e = {} for i=1,9,1 while true do
local last = args["editor" .. i .. "-last"] or args["editor-last" .. i] or args["EditorSurname" .. i] or args["Editor" .. i]
if ( last ~= nil ) then
e[i].first = args["editor" .. i .. "-first"] or args["editor-first" .. i] or args["EditorGiven" .. i]
e[i].link = args["editor" .. i .. "link"] or args["editorlink" .. i]
else
break
end
i = i + 1
end
if ( e[1] == nil ) then