Module:Article stub box: Difference between revisions

Content deleted Content added
indent comments in line with the code
make the helper functions local functions
Line 20:
or a table of strings and/or tables containing parts. (See below)
]]
local function category(cat)
local attention, link = 'Stub message templates needing attention'
for _, v in ipairs((type(cat) == type'' or cat.t) and {cat} or cat) do
Line 54:
Will return an empty string instead when ifNot evaluates to true
]]
local function ombox(v)
if v.ifNot then
return ''
Line 70:
most stub category error checks except for the ombox for when main |category= is omitted (See p.template())
]]
local function catStub(page, pageDoc)
stubCats = {missing = {}, v = {}}
for k, _ in pairs(args) do
Line 122:
 
--Shows population of categories found by catStub(). Outputs demo values if none
local function population()
local wikitext, base = '', '* [[:Category:%s]] (population: (%s)\n'
if not args.category and stubCats[1] ~= false then