Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.
Revision as of 22:49, 21 March 2026 by Admin (talk | contribs) (Created page with "local p = {} function p.formatList(frame) local input = frame.args[1] or "" local sep = frame.args.sep or "," local result = {} for item in string.gmatch(input, "([^" .. sep .. "]+)") do item = item:match("^%s*(.-)%s*$") -- trim whitespace if item ~= "" then table.insert(result, "" .. item .. "") end end return table.concat(result, ", ") end return p")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

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

local p = {}

function p.formatList(frame)
    local input = frame.args[1] or ""
    local sep = frame.args.sep or ","
    local result = {}
    for item in string.gmatch(input, "([^" .. sep .. "]+)") do
        item = item:match("^%s*(.-)%s*$") -- trim whitespace
        if item ~= "" then
            table.insert(result, "[[" .. item .. "]]")
        end
    end
    return table.concat(result, ", ")
end

return p