Module:PrettyList: Difference between revisions

From Bonkipedia
[[mw:]]>Legoktm
(use commas)
 
m (1 revision imported: Module Import)
 
(No difference)

Latest revision as of 18:20, 12 November 2022

{{#invoke:PrettyList|prettify|mediawiki/core,mediawiki/extensions/FooBar}} produces:

mediawiki/core, mediawiki/extensions/FooBar


local p = {}

p.prettify = function( frame )
	local ugly = frame.args[1]
	local splitted = mw.text.split( ugly, ',', true )
	return '<code>' .. table.concat( splitted, "</code>, <code>" ) .. "</code>"
end

return p