Documentation for this module may be created at Module:Sort/doc
local p = {}
function p.parse(frame)
local input = frame.args[1] or ""
local items = {}
for item in string.gmatch(input, "([^,]+)") do
table.insert(items, item:match("^%s*(.-)%s*$")) -- Trim whitespace
end
table.sort(items)
return frame:preprocess(table.concat(items, ", "))
end
return p