Module:JapanNewsSummary

local p = {}

function p.renderPage local sb = { '{| class="wikitable sortable frozen-header" width="100%"\n', '! data-sort-type="isoDate" width="90px" | Date\n', '! Type\n', '! class="spacer" | Description\n', }   for i, entry in pairs(mw.loadData("Module:JapanNewsSummary/Data")) do        if entry.date then table.insert(sb, '|-\n') table.insert(sb, '| data-sort-value="' .. entry.date .. '" | ') if entry.url then table.insert(sb, '[' .. entry.url .. ' ' .. entry.date .. ']\n') else table.insert(sb, entry.date .. '\n') end table.insert(sb, '| ' .. (entry.type or 'Unknown') .. '\n') table.insert(sb, '| ' .. (entry.summary or ' ') .. '\n') end end table.insert( sb, "|}" ) return table.concat(sb) end

return p