0
edits
imported>Matt Fitzpatrick (semantic navigation region and list instead of table; get alt attributes from /images submodules) |
(quick hack to prevent p._image from returning filenames with things like "|border" in them) |
||
local function getImageName(s)
-- Gets the image name for a given string.
local default = 'Portal-puzzle.svg|link=|alt='
if type(s) ~= 'string' or #s < 1 then
return
end
s = mw.ustring.lower(s)
return matchImagePage(s) or matchImagePage(getAlias(s)) or
end
function p._image(portals)
-- Wrapper function to allow getImageName() to be accessed through #invoke.
return name:match('^(.-)|') or name -- FIXME: use a more elegant way to separate borders etc. from the image name
end
|
edits