Module:Entry: Difference between revisions

I guess I need to learn more about `mw.html`...
(oops)
(I guess I need to learn more about `mw.html`...)
Line 47: Line 47:
local result = entry[arg]
local result = entry[arg]
if type(result) == "function" then result = result(entry) end
if type(result) == "function" then result = result(entry) end
wikitable -- Should be a <tr> here
wikitable = wikitable -- Should be a <tr> here
:tag("td"):tag("code")
:tag("td"):tag("code")
:wikitext(mw.ustring.format(
:wikitext(mw.ustring.format(
Line 71: Line 71:
:done()
:done()
for _, stage in ipairs(rh.stages) do
for _, stage in ipairs(rh.stages) do
wikitable:tag("tr"):tag("td")
wikitable = wikitable:tag("tr")
:attr("rowspan", tostring(#stage.entries))
:tag("td")
:wikitext(stage.name)
:attr("rowspan", tostring(#stage.entries))
:done() -- Should be a <tr> here
:wikitext(stage.name)
:done() -- Should be a <tr> here
for number, _ in ipairs(stage.entries) do
for number, _ in ipairs(stage.entries) do
if number ~= 1 then wikitable:tag("tr") end
if number ~= 1 then wikitable = wikitable:tag("tr") end
addRow(p.new(rh.console, stage.label, number))
addRow(p.new(rh.console, stage.label, number))
end
end
420

edits