7,038
edits
No edit summary |
No edit summary |
||
| Line 5: | Line 5: | ||
local title = mw.title.new(args.item) | local title = mw.title.new(args.item) | ||
local text = title:getContent() | local text = title:getContent() | ||
return | local games = p.extractGames(text) | ||
return games | |||
end | end | ||
| Line 16: | Line 17: | ||
return args | return args | ||
end | end | ||
end | |||
function p.extractGames(text) | |||
local games = text:match("|%s*games%s*=%s*([^|]+)") | |||
if games then | |||
games = games:match("^%s*(.-)%s*$") -- trim whitespace | |||
end | |||
return games | |||
end | end | ||
return p | return p | ||
edits