Moduuli:Cs:ImageFormatter

Wikipediasta
Siirry navigaatioon Siirry hakuun

local p = {}

function p.makeImage(value, options)
	local image = '[[File:' .. value
	if options.size then
		image = image .. '|' .. options.size
	end
	if options.description then
		image = image .. '|' .. options.description
	end
	if options.link then
		image = image .. '|link=' .. options.link
	end
	if options.alt or options.description then
		image = image .. '|alt=' .. (options.alt or options.description)
	end
	return image .. ']]'
end

return p