Content deleted Content added
load module right before use |
add comments |
||
Line 8:
local p = {}
-- Implements [[Template:Icon]]
-- Returns the icon image corresponding to a string (like 'B')
function p._main(args, data)
local inSandbox = yesNo(args.sandbox)
Line 30 ⟶ 32:
end
-- Implements [[Template:Icon link]], a superset of [[Template:Icon]]
-- Returns an icon, plus a suitably formatted wikilink
function p._link(args, data)
args.size = args.size or args.iconsize
local icon = p._main(args, data)
-- If no link given in args[2], default back to [[Template:Icon]]
if not args[2] then
return icon
end
-- Strip wiki markup out of link
getPlain = getPlain or require("Module:Text").Text().getPlain
local link = getPlain(args[2])
|