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

Content deleted Content added
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
పంక్తి 70:
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
 
Line 133 ⟶ 134:
 
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/మాడ్యూల్:Portal" నుండి వెలికితీశారు