8,756
edits
mNo edit summary |
mNo edit summary |
||
Line 94: | Line 94: | ||
local footer = tablefooter or {} | local footer = tablefooter or {} | ||
for | for _, entry in ipairs(final) do | ||
tableRows | tableRows.insert(('<tr><td>%s</td><td>%s</td><td>%s</td><td>%s</td></tr>'):format(entry.item, entry.quantity, entry.weight, entry.chance)) | ||
end | end | ||
if #footer > 0 then | if #footer > 0 then | ||
tableRows | tableRows.insert(('<tr><td colspan="3">%s</td><td>%s</td></tr>'):format(footer.item, footer.chance)) | ||
end | end | ||
return ('<table class="wikitable sortable">%s%s</table>'):format(TABLE_HEADER, table.concat(tableRows, '')) | return ('<table class="wikitable sortable">%s%s</table>'):format(TABLE_HEADER, table.concat(tableRows, '')) |