Module:Dochead: Difference between revisions

Ganaram inukshuk (talk | contribs)
try to keep text from breaking adjacent templates
Ganaram inukshuk (talk | contribs)
bugfix logic for default headers: if it's a module, it's noinvoke; if it's anything else, it's none
Line 152: Line 152:
args["namespace"] = args["namespace"] or title.nsText
args["namespace"] = args["namespace"] or title.nsText
args["pagename" ] = args["pagename" ] or title.text
args["pagename" ] = args["pagename" ] or title.text
args["header"   ] = args["header"   ] or args["namespace"] == "Module" and "noinvoke" or ""
 
-- Extract header or set it to defaults
if args["header"] == nil or args["header"] == "" then
if args["namespace"] == "Module" then
args["header"] = "noinvoke"
else
args["header"] = "none"
end
end
-- Extract template/module names, or autogenerate them
-- Extract template/module names, or autogenerate them