10,731
edits
TheNightAvl (talk | contribs) No edit summary |
TheNightAvl (talk | contribs) (Added sorting) |
||
Line 28: | Line 28: | ||
) | ) | ||
end | end | ||
table.sort(links, function(a, b) return a.term < b.term end) | |||
if #links > 1 then plural = "s" end | if #links > 1 then plural = "s" end | ||
return '<span class="nyms" data-label="' .. data.label .. 's"><span class="nyms-label">' .. data.label:gsub("^%l", string.upper) .. plural .. ':</span> ' .. table.concat(links, ", ") .. '</span>' | return '<span class="nyms" data-label="' .. data.label .. 's"><span class="nyms-label">' .. data.label:gsub("^%l", string.upper) .. plural .. ':</span> ' .. table.concat(links, ", ") .. '</span>' |