Module:columns: Difference between revisions

Jump to navigation Jump to search
ਕੋਈ ਸੋਧ ਸਾਰ ਨਹੀਂ
No edit summary
No edit summary
Line 17: Line 17:
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(terms)
local out = '<div class="ul-columns" data-column-count="' .. data.columns .. '">'
local out = '<div class="ul-columns" data-column-count="' .. data.columns .. '">'
for _, term in ipairs(terms) do
for _, term in ipairs(terms) do
Line 38: Line 39:
i = i + 1
i = i + 1
end
end
mw.logObject(terms)
return export.create_list{
return export.create_list{
terms = terms,
terms = terms,

Navigation menu