Module:Category handler: Difference between revisions

Ganaram inukshuk (talk | contribs)
rollback to previously working code
Ganaram inukshuk (talk | contribs)
add hidden comment output for suppressed categorization
Tag: Reverted
Line 115: Line 115:
--local ns_override = ns_override or { ["module"] = true }
--local ns_override = ns_override or { ["module"] = true }
-- If in a suppressed namespace/prefix, or in debug mode (suppresses ALL
-- If categorization is suppressed, don't bother categorizing, but add a
-- categorization) don't bother
-- comment
if is_suppressed_namespace(ns_override)  
if is_debug or suppressed_ns or suppressed_suffix then
or has_suppressed_suffix(suffixes)
local reason = is_debug and "debug mode"
or is_debug then
or (suppressed_ns and "suppressed namespace")
return ''
or (suppressed_suffix and "suppressed suffix")
or "unknown"
 
return string.format(
"<!-- categorization suppressed: %s; is_debug=%s; suppressed_ns=%s; suppressed_suffix=%s -->",
reason,
tostring(is_debug),
tostring(suppressed_ns),
tostring(suppressed_suffix)
)
end
end