Module:Documentation: Difference between revisions
Content added Content deleted
(use "ugsub" rather than "gsub" as the abbreviation for mw.ustring.gsub, to make it clearer that it isn't the regular string.gsub) |
(simplify the start box code and attempt to get some more output if the env table contains errors) |
||
Line 375:
-- No need to include the links if the documentation is on the template page itself.
local linksData = p.makeStartBoxLinksData(args, env)
if
links = p.renderStartBoxLinks(linksData)
end
end
-- Generate the start box html.
local data = p.makeStartBoxData(args, env, links)
if
return p.renderStartBox(data)
-- data is an error message.▼
else
-- User specified no heading.
Line 446 ⟶ 440:
local subjectSpace = env.subjectSpace
if not subjectSpace then
-- Default to an "other namespaces" namespace, so that we get at least some output
subjectSpace = 2
end
local data = {}
|