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
if type(entry[column]) == "table" then
line = line .. "<td>"
local firstline = true
line = line .. "<td><ul>"
for _,v in pairs(entry[column]) do
if not firstline then
line = line .. "<br>"
else
firstline = false
end
line = line .. v
line = line .. "<li>" .. v .. "</li>"
end
line = line .. "</td>"
line = line .. "</ul></td>"
else
line = line.."<td>"..entry[column].."</td>"
end