Module:Bold list/sandbox
Appearance
![]() | This is the module sandbox page for Module:Bold list. |
-- Written by User:Ahecht in response to a thread at [[WP:VPI]]
return { main = function(frame)
index = {}
for k, v in pairs(frame:getParent().args) do
if type(k) == 'number' and (v or "") ~= "" then table.insert(index, k) end
end
table.sort(index)
args = {}
for _, v in ipairs(index) do table.insert(args, frame:getParent().args[v]) end
conj = "'''" .. (#args > 2 and ", " or " ") .. (frame.args.conj or "or") .. " '''"
return "'''"..mw.text.listToText(args, "''', '''", conj).."'''"
end }