2,788
edits
No edit summary |
No edit summary |
||
Line 15: | Line 15: | ||
function export.create_list(data) | function export.create_list(data) | ||
mw.logObject(data) | mw.logObject(data.terms) | ||
if not data.terms then error("{{columns}} must be supplied with a list of terms") end | if not data.terms then error("{{columns}} must be supplied with a list of terms") end | ||
local terms = table.sort(data.terms, function(a, b) return a.term > b.term end) | local terms = table.sort(data.terms, function(a, b) return a.term > b.term end) | ||
mw.logObject(data.terms) | |||
mw.logObject(terms) | mw.logObject(terms) | ||
local out = '<div class="ul-columns" data-column-count="' .. data.columns .. '">' | local out = '<div class="ul-columns" data-column-count="' .. data.columns .. '">' |