Module:Category described in year: Difference between revisions

Content deleted Content added
m ce, from sandbox
 
Line 46:
[1] = '', --placeholder for [[Category:Described in year unknown category]]
[2] = '', --placeholder for [[Category:Described in year error]]
[3] = '', --placeholder for [[Category:Described in year with manual category]]
}
local outString = nil
Line 321 ⟶ 322:
break
end
end
--check for manual cats
if currentTitle.namespace == 14 then --category namespace
local currContent = mw.title.makeTitle( 'Category', currCat or '' ):getContent()
local mancat = mw.ustring.match(currContent or '', '%[%[%s*Category')
if mancat then trackingCats[3] = '[[Category:Described in year with manual category]]' end
end
Line 359 ⟶ 367:
end
outString = outString..br..mw.ustring.gsub(table.concat(trackingCats, br), '%[%[', '[[:')
--ws cleanup
outString = mw.ustring.gsub(outString, br..br, br) --produced by empty ('') first/consecutive tracking cat/s
outStringwhile = mw.ustringstring.gsubmatch(outString, br..br,) br)do --jicrem (usedup whilebrs loopproduced ifby #trackingCatsempty >=('') 3first/consecutive ortracking 4)cat/s
outString = string.gsub(outString, br..br, br)
end
end