Module:Module introspection: Difference between revisions
No edit summary |
No edit summary |
||
| Line 205: | Line 205: | ||
table.insert(lines, "! Line") | table.insert(lines, "! Line") | ||
for _, | for _, info in ipairs(module_funcs) do | ||
local link = string.format("[[Module:%s#L-%d|%s]]", module_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 | 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, "| " .. | 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 | ||
deps_found[dep] = true | |||
num_deps = num_deps + 1 | num_deps = num_deps + 1 | ||
end | end | ||