Module:Module introspection: Difference between revisions

Ganaram inukshuk (talk | contribs)
No edit summary
Ganaram inukshuk (talk | contribs)
No edit summary
Line 205: Line 205:
table.insert(lines, "! Line")
table.insert(lines, "! Line")


for _, f in ipairs(module_funcs) do
for _, info in ipairs(module_funcs) do
local link = string.format("[[Module:%s#L-%d|%s]]", module_name, f.line, f.name)
local link = string.format("[[Module:%s#L-%d|%s]]", module_name, info.line, info.name)
-- If the function is the main function, add "main" to that cell
-- If the function is the main function, add "main" to that cell
if f.name == main_function then
if info.name == main_function then
link = link .. " '''(main)'''"
link = link .. " '''(main)'''"
end
end
Line 215: Line 215:
table.insert(lines, "|-")
table.insert(lines, "|-")
table.insert(lines, "| " .. link)
table.insert(lines, "| " .. link)
table.insert(lines, "| " .. f.line)
table.insert(lines, "| " .. info.line)
end
end
table.insert(lines, "|}")
table.insert(lines, "|}")
Line 251: Line 251:
local dep = info.dep
local dep = info.dep
if not deps_found[dep] then
if not deps_found[dep] then
info.dep = true
deps_found[dep] = true
num_deps = num_deps + 1
num_deps = num_deps + 1
end
end