Module:Proposal support: Difference between revisions

From Tardis Wiki, the free Doctor Who reference
No edit summary
No edit summary
Line 5: Line 5:
local supporters = #args
local supporters = #args
local list = ""
local list = ""
for i=1, #arg do
for i=1, #args do
list = list .. "\n* " .. arg[i]
list = list .. "\n* " .. args[i]
end
end
local final = "<span data-sort-value=\"" .. supporters .. "\">" .. list .. "</span>"
local final = "<span data-sort-value=\"" .. supporters .. "\">" .. list .. "</span>"

Revision as of 15:14, 3 January 2023

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

local p = {}

function p.proposalSupport(frame)
	local args = frame:getParent().args
	local supporters = #args
	local list = ""
	for i=1, #args do
		list = list .. "\n* " .. args[i]
	end
	local final = "<span data-sort-value=\"" .. supporters .. "\">" .. list .. "</span>"
	return final
end

return p