Məzmuna keç

Modul:Citation

Vikipediya, azad ensiklopediya

Bu modulun sənədləşdirmə səhifəsi Modul:Citation/doc səhifəsində yaradıla bilər

local p = {}

local param  = require('Modul:Citation/Parameters')
local render = require('Modul:Citation/Render')

function p.cite_web(frame)
	local args = param.get(frame)
	local out = {}

	if render.author then
		local a = render.author(args)
		if a and a ~= '' then table.insert(out, a) end
	end

	if render.title then
		local t = render.title(args)
		if t and t ~= '' then table.insert(out, t) end
	end

	if render.website then
		local w = render.website(args)
		if w and w ~= '' then table.insert(out, w) end
	end

	if render.dates then
		local d = render.dates(args)
		if d and d ~= '' then table.insert(out, d) end
	end

	return mw.text.trim(table.concat(out, ' '))
end

p.cite_news = p.cite_web

return p