Module:Utils

From Umamusume Wiki
Revision as of 02:56, 15 March 2024 by Snep (talk | contribs) (Created page with "local p = {} local cargo = mw.ext.cargo function p.splitLinks(frame) local values = frame.args[1] local split = mw.text.split(values, ', ', true) local newText = {} for _,s in ipairs(split) do table.insert(newText, '' .. s .. '') end return table.concat(newText, ', ') end return p")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Documentation for this module may be created at Module:Utils/doc

local p = {}
local cargo = mw.ext.cargo

function p.splitLinks(frame)
	local values = frame.args[1]
	local split = mw.text.split(values, ', ', true)
	local newText = {}
	for _,s in ipairs(split) do
		table.insert(newText, '[[' .. s .. ']]')
	end
	return table.concat(newText, ', ')
end

return p