Module:Bold list: Difference between revisions

From Frontierpedia, the Microsoft Agent encyclopedia
en>Ahecht
(frame.args→frame:getParent().args)
m (3 revisions imported: importing hlist)
 
(One intermediate revision by one other user not shown)
Line 3: Line 3:
args = {}
args = {}
for i, v in ipairs(frame:getParent().args) do table.insert(args, v) end
for i, v in ipairs(frame:getParent().args) do table.insert(args, v) end
conj = "'''" .. (#args > 2 and ", " or " ") .. (args.conj or "or") .. " '''"
conj = "'''" .. (#args > 2 and ", " or " ") .. (frame.args.conj or "or") .. " '''"
return "'''"..mw.text.listToText(args, "''', '''", conj).."'''"
return "'''"..mw.text.listToText(args, "''', '''", conj).."'''"
end }
end }

Latest revision as of 20:51, 14 October 2022

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

-- Written by User:Ahecht in response to a thread at [[WP:VPI]]
return { main = function(frame)
	args = {}
	for i, v in ipairs(frame:getParent().args) do table.insert(args, v)	end
	conj = "'''" .. (#args > 2 and ", " or " ") .. (frame.args.conj or "or") .. " '''"
	return "'''"..mw.text.listToText(args, "''', '''", conj).."'''"
end }