Module:Category handler: Difference between revisions
rollback to previously working code |
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 | -- If categorization is suppressed, don't bother categorizing, but add a | ||
-- | -- comment | ||
if | if is_debug or suppressed_ns or suppressed_suffix then | ||
local reason = is_debug and "debug mode" | |||
or (suppressed_ns and "suppressed namespace") | |||
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 | ||