19.866
Bearbeitungen
Keine Bearbeitungszusammenfassung |
Keine Bearbeitungszusammenfassung |
||
| Zeile 19: | Zeile 19: | ||
end | end | ||
function p.tableLine( | function p.tableLine(args) | ||
-- mw.log("tableLine( | -- mw.log("tableLine(args)") | ||
-- mw.logObject( | -- mw.logObject(args, "args") | ||
local t = "<tr>\n" | local tr_args = "" | ||
for _, a in ipairs( | 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" | ||