Module:Replace

From Call of Duty Esports Wiki
Jump to: navigation, search

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

local util_args = require('Module:ArgsUtil')

local h = {}

local p = {}
function p.main(frame)
	local args = util_args.original()
	if not args[2] then return args[1] end
	local replacement = args[1]:gsub(frame:preprocess(args[2]), args[3] or '')
	return replacement
end
return p