"మాడ్యూల్:Portal" కూర్పుల మధ్య తేడాలు

quick hack to prevent p._image from returning filenames with things like "|border" in them
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 'Portal-puzzle.svg|link=|alt='default
end
s = mw.ustring.lower(s)
return matchImagePage(s) or matchImagePage(getAlias(s)) or 'Portal-puzzle.svg|link=|alt='default
end
 
 
function p._image(portals)
 
-- Wrapper function to allow getImageName() to be accessed through #invoke.
returnlocal name = getImageName(portals[1])
return name:match('^(.-)|') or name -- FIXME: use a more elegant way to separate borders etc. from the image name
end
 
"https://te.wikipedia.org/wiki/ప్రత్యేక:MobileDiff/2168275" నుండి వెలికితీశారు