Module:SpriteFile: Difference between revisions
No edit summary |
No edit summary |
||
| Line 128: | Line 128: | ||
local text | local text | ||
if not args.notext then | if not args.notext then | ||
text = args.text or args[2] or | text = args.text or args[2] or '' | ||
if text == '' then | |||
local nameStart = (link:find( ':' ) or 0 ) + 1 | |||
if nameStart - 1 == #link then | |||
nameStart | nameStart = 1 | ||
end | |||
text = link:sub( nameStart, ( link:find( '[,%[]', nameStart ) or 0 ) - 1 ) | |||
end | end | ||
end | end | ||