Content deleted Content added
No edit summary |
No edit summary |
||
Line 6:
}
};
function trim( str )▼
return '';▼
end▼
end ▼
--[[--------------------------< I S _ S E T >------------------------------------------------------------------
Whether variable is set or not. A varable is set when it is not nil and not empty.
]]
Line 29 ⟶ 15:
function is_set( var )
return not (var == nil or var == '');
-- if all items in list are set, return true, else false
local list = {...};
for _, var in pairs(list) do
if not is_set( var ) then
end
▲ end
return true;
end
Line 37 ⟶ 35:
and text; encloses the whole within a span with id and class attributes.
This creates a CITEREF anchor from |last1= through |last4= and |year=. It also creates a CITEREF link from |in1= through
Even though not displayed, a year parameter is still required for the CITEREF anchor
Line 63 ⟶ 61:
end
if are_all_set ({args.last4, args.last3, args.last2, args.last1}) then
contributors = args.last1 .. args.first .. ' et al.';
elseif is_set (args.last3) and is_set (args.last2) and is_set (args.last1) then
|