Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

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