Module:Category handler/sandbox: Difference between revisions

Content deleted Content added
attempt detecting broken parameter "nocat"
m sync with live version
 
(15 intermediate revisions by the same user not shown)
Line 74:
local value = obj:parameter(key)
value = trimWhitespace(value, true)
if value == '{}' or value == '{{nocat}}' then
obj['brokenNocat'] = true
end
obj['_' .. key] = yesno(value)
end
Line 215 ⟶ 212:
local ret = {self:parameter('all')}
local numParam = tonumber(nsCategory)
if self.brokenNocat then
-- temporary category
ret[#ret + 1] = '[[Category:Templates with incorrect parameter syntax]]'
end
if numParam and numParam >= 1 and math.floor(numParam) == numParam then
-- nsCategory is an integer