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:
parent
5f5b1dcb2b
commit
ddb88ed945
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue