Module:Infobox sort
Appearance
local p = {}
function p.asc(frame)
items = splitLine( frame.args[1] )
table.sort( items )
return table.concat( items, "<br>" );
end
function p.desc(frame)
list = {}
for key,value in pairs(frame.args) do
table.insert(list, value)
end
table.sort( list, function (a, b) return a > b end )
return table.concat( list, "<br>" )
end
function splitLine( text )
return mw.text.split( text, "\n", true )
end
return p