Modul:HTML/Work: Unterschied zwischen den Versionen

Aus FürthWiki

keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Keine Bearbeitungszusammenfassung
Zeile 19: Zeile 19:
end
end


function p.tableLine(line)
function p.tableLine(args)
-- mw.log("tableLine(line)")
-- mw.log("tableLine(args)")
-- mw.logObject(line, "line")
-- mw.logObject(args, "args")
local t = "<tr>\n"
local tr_args = ""
for _, a in ipairs(line) do
local td_args = ""
t = t .. "  <td>" .. a .. "</td>\n"
if args.tr_args ~= nil then
tr_args = " " .. args.tr_args
end
local t = "<tr " .. tr_args .. ">\n"
for _, a in ipairs(args) do
td_args = ""
if type(a) == "table" then
if a.td_args ~= nil then
td_args = " " .. a.td_args
end
a = a[1]
end
t = t .. "  <td" .. td_args .. ">" .. a .. "</td>\n"
end
end
t = t .. "</tr>\n"
t = t .. "</tr>\n"