Content deleted Content added
An experiment |
No edit summary |
||
Line 52:
assert(class4Index or not frame.args.class4, "Class 4 field not found.")
assert(class5Index or not frame.args.class5, "Class 5 field not found.")
local records = {}
for i, record in ipairs(data.data) do▼
table.insert(records, {
recoveries = recoveriesIndex and record[recoveriesIndex],
cases = casesIndex and record[casesIndex],
class4 = class4Index and record[class4Index],
class5 = class5Index and record[class5Index],
})
local rows = {}
local
for i, record in ipairs(records) do
▲ for i, record in ipairs(data.data) do
local row = {
}
if casesIndex and not
table.insert(row, "firstright1=y")
end
if deathsIndex and
table.insert(row, "firstright2=y")
end
Line 78 ⟶ 89:
table.insert(rows, table.concat(row, ";"))
prevRecord = record
▲ prevCases = record[casesIndex]
▲ end
▲ prevDeaths = record[deathsIndex]
end
return table.concat(rows, "\n")
|