Module:Description2

From Fortnite Esports Wiki
Jump to: navigation, search

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

local util_args = require('Module:ArgsUtil')

local p = {}
function p.main(frame)
	-- strips links & markup characters from standard bio sentence or custom text to be saved in metadesc via description2 extension
	local args = util_args.merge(true)
	local desc = args[1]
	if not desc then
		return
	end
	desc = desc:gsub("%[[^%]]*%|","[")
	desc = desc:gsub("['%[%]]",'')
	frame:callParserFunction{name = '#description2', args=desc}
end
return p