Module:Dochead: Difference between revisions

Ganaram inukshuk (talk | contribs)
order of operations
Ganaram inukshuk (talk | contribs)
strip /doc in the main function if present
Line 66: Line 66:
return p.categorize(namespace, pagename)
return p.categorize(namespace, pagename)
end
end
-- Remove doc subpage if present
corr_template = corr_template:gsub("/doc$", "")
corr_module  = corr_module  :gsub("/doc$", "")


local result = ""
local result = ""
Line 149: Line 153:
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 ""
args["header"  ] = args["header"  ] or args["namespace"] == "Module" and "noinvoke" or ""
-- Remove doc subpage if present
args["pagename"] = args["pagename"]:gsub("/doc$", "")
-- Extract template/module names, or autogenerate them
-- Extract template/module names, or autogenerate them