Jump to content

Module:Sorted plain list

From Wikipedia, the free encyclopedia
This is an old revision of this page, as edited by Frietjes (talk | contribs) at 23:15, 11 April 2016. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

local p = {}

function p.asc(frame)
    items = mw.text.split( frame.args[1] or '', ',', true)
    table.sort( items )
    return '<div class="plainlist"><ul><li>' .. table.concat( items, "</li><li>" ) .. '</li></ul></div>'
end

function revComp( a, b )
    return a > b
end

return p