Module:BattleTeam: Difference between revisions
From Cassette Beasts
No edit summary |
No edit summary |
||
| Line 3: | Line 3: | ||
function p.get_moves(frame) | function p.get_moves(frame) | ||
local move_list = mw.text.split(frame.args[1], ",") | local move_list = mw.text.split(frame.args[1], ",", true) | ||
local result = {} | local result = {} | ||
Revision as of 00:06, 11 September 2026
Documentation for this module may be created at Module:BattleTeam/doc
local p = {}
local get_move_link = require('Module:Database').get_link
function p.get_moves(frame)
local move_list = mw.text.split(frame.args[1], ",", true)
local result = {}
for _, move in ipairs(move_list) do
local row = mw.html.create('tr')
local cell = row:tag('td')
:attr('align', 'center')
:addClass('battle_move_link')
:wikitext(get_move_link(move))
:allDone()
table.insert(result, tostring(cell))
end
return table.concat(result)
end
return p
