Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

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

local p = {}
function p.animate( f )
	local args = f
	if f == mw.getCurrentFrame() then
		args = f:getParent().args
	end
	
	local text = {}
	for row in mw.text.gsplit( args[1], '%s*,,%s*' ) do
		if row == '' then
			table.insert( text, '<span><br></span>' )
		else
			table.insert( text, '<span>' .. row .. '</span>' )
		end
	end
	text[1] = text[1]:gsub( '^<span>', '<span class="animated-active">' )
	
	return '<span class="animated">' .. table.concat( text ) .. '</span>'
end
return p