Module:Dochead: Difference between revisions

Ganaram inukshuk (talk | contribs)
bugfix
Ganaram inukshuk (talk | contribs)
mNo edit summary
Line 227: Line 227:
local corr_template = args["temp"] or pagename
local corr_template = args["temp"] or pagename
local corr_module  = args["mod"]  or pagename
local corr_module  = args["mod"]  or pagename
-- Normalize namespace prefixes
if not corr_template:match("^Template:") then
corr_template = "Template:" .. corr_template
end
if not corr_module:match("^Module:") then
corr_module = "Module:" .. corr_module
end


-- If header is none, skip everything
-- If header is none, skip everything
Line 256: Line 248:


-- Categorization and output
-- Categorization and output
local has_link = namespace == "Template" and iutils.page_exists(corr_module)
local has_link = namespace == "Template" and iutils.page_exists("Module:" .. corr_module)
if result == "" then
if result == "" then
return categorize(namespace, pagename, has_link)
return categorize(namespace, pagename, has_link)