Documentation for this module may be created at Module:AbilityBoxes/doc
local p = {}
function p.parse(frame)
-- Get the input from the first argument passed to the module
local input = frame.args[1] or ""
-- Split the input string by commas
local abilities = {}
for ability in string.gmatch(input, "([^,]+)") do
table.insert(abilities, ability:match("^%s*(.-)%s*$")) -- Trim whitespace
end
-- Wrap each ability in the AbilityBox template
local result = {}
for _, ability in ipairs(abilities) do
table.insert(result, "{{AbilityBox|Ability:" .. ability .. "}}")
end
-- Return the concatenated result
return table.concat(result)
end
return p