Module:Dochead: Difference between revisions

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
Ganaram inukshuk (talk | contribs)
bugfix blank hatnote output
Line 140: Line 140:
end
end


-- Append categorization info
-- Append categorization info to hatnote
-- Check whether hatnote is blank; if so, don't bother with hatnote, just
-- output categories
local has_link = namespace == "Template" and has_module
local has_link = namespace == "Template" and has_module
return string.format(":''%s'' %s\n", result, p.categorize(namespace, pagename, has_link))
if result == "" then
return p.categorize(namespace, pagename, has_link)
else
return string.format(":''%s'' %s\n", result, p.categorize(namespace, pagename, has_link))
end
end
end


Line 158: Line 164:
args["header"] = "noinvoke"
args["header"] = "noinvoke"
else
else
args["header"] = "none"
args["header"] = ""
end
end
end
end