List of values in table renders as HTML list

Co-authored-by: Aire-One <Aire-One@users.noreply.github.com>
This commit is contained in:
aflorea-2k 2021-08-02 14:48:50 +02:00 committed by GitHub
parent 5f5b1dcb2b
commit ddb88ed945
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 9 deletions

View File

@ -227,17 +227,11 @@ local function create_table(entries, columns, prefix)
for _, column in ipairs(columns) do for _, column in ipairs(columns) do
if type(entry[column]) == "table" then if type(entry[column]) == "table" then
line = line .. "<td>" line = line .. "<td><ul>"
local firstline = true
for _,v in pairs(entry[column]) do for _,v in pairs(entry[column]) do
if not firstline then line = line .. "<li>" .. v .. "</li>"
line = line .. "<br>"
else
firstline = false
end end
line = line .. v line = line .. "</ul></td>"
end
line = line .. "</td>"
else else
line = line.."<td>"..entry[column].."</td>" line = line.."<td>"..entry[column].."</td>"
end end