<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://the-democratika.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3AArticle_stub_box</id>
	<title>Module:Article stub box - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://the-democratika.com/wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3AArticle_stub_box"/>
	<link rel="alternate" type="text/html" href="https://the-democratika.com/wiki/index.php?title=Module:Article_stub_box&amp;action=history"/>
	<updated>2026-04-04T13:04:49Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.0</generator>
	<entry>
		<id>https://the-democratika.com/wiki/index.php?title=Module:Article_stub_box&amp;diff=10695&amp;oldid=prev</id>
		<title>Akarea: rename wikipedia to tdk wiki</title>
		<link rel="alternate" type="text/html" href="https://the-democratika.com/wiki/index.php?title=Module:Article_stub_box&amp;diff=10695&amp;oldid=prev"/>
		<updated>2025-03-15T16:49:22Z</updated>

		<summary type="html">&lt;p&gt;rename wikipedia to tdk wiki&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:49, 15 March 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l240&quot;&gt;Line 240:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 240:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;						:wikitext(&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;						:wikitext(&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;							Buffer&amp;#039;This&amp;#039;:_(args.subject):_(args.article or &amp;#039;article&amp;#039;):_(args.qualifier)&amp;#039; &amp;#039;,--space&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;							Buffer&amp;#039;This&amp;#039;:_(args.subject):_(args.article or &amp;#039;article&amp;#039;):_(args.qualifier)&amp;#039; &amp;#039;,--space&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;							&#039; is a &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Wikipedia:&lt;/del&gt;stub&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;|stub]]&lt;/del&gt;. You can help &lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Wikipedia &lt;/del&gt;by [&#039;,&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;							&#039; is a stub. You can help &lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;the Democratikan Wiki &lt;/ins&gt;by [&#039;,&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;							page:fullUrl(&amp;#039;action=edit&amp;#039;, &amp;#039;relative&amp;#039;),&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;							page:fullUrl(&amp;#039;action=edit&amp;#039;, &amp;#039;relative&amp;#039;),&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;							&amp;#039; expanding it].&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;							&amp;#039; expanding it].&amp;#039;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key tdk_wiki-tdkw_:diff:1.41:old-10692:rev-10695:php=table --&gt;
&lt;/table&gt;</summary>
		<author><name>Akarea</name></author>
	</entry>
	<entry>
		<id>https://the-democratika.com/wiki/index.php?title=Module:Article_stub_box&amp;diff=10692&amp;oldid=prev</id>
		<title>Akarea: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://the-democratika.com/wiki/index.php?title=Module:Article_stub_box&amp;diff=10692&amp;oldid=prev"/>
		<updated>2025-03-15T16:43:29Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en-GB&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 16:43, 15 March 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;4&quot; class=&quot;diff-notice&quot; lang=&quot;en-GB&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key tdk_wiki-tdkw_:diff:1.41:old-10691:rev-10692 --&gt;
&lt;/table&gt;</summary>
		<author><name>Akarea</name></author>
	</entry>
	<entry>
		<id>https://the-democratika.com/wiki/index.php?title=Module:Article_stub_box&amp;diff=10691&amp;oldid=prev</id>
		<title>Wikipedia&gt;Anomie: Escape `{{` in output to avoid a Parsoid bug. See Wikipedia:AutoWikiBrowser/Tasks#c-Anomie-20250302162200-Anomie-20250302155000 for details.</title>
		<link rel="alternate" type="text/html" href="https://the-democratika.com/wiki/index.php?title=Module:Article_stub_box&amp;diff=10691&amp;oldid=prev"/>
		<updated>2025-03-02T21:04:45Z</updated>

		<summary type="html">&lt;p&gt;Escape `{{` in output to avoid a Parsoid bug. See &lt;a href=&quot;https://en.wikipedia.org/wiki/AutoWikiBrowser/Tasks#c-Anomie-20250302162200-Anomie-20250302155000&quot; class=&quot;extiw&quot; title=&quot;wikipedia:AutoWikiBrowser/Tasks&quot;&gt;Wikipedia:AutoWikiBrowser/Tasks#c-Anomie-20250302162200-Anomie-20250302155000&lt;/a&gt; for details.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;--[[&lt;br /&gt;
This module was created by User:CodeHydro (Alexander Zhikun He).&lt;br /&gt;
User:Jackmcbarn and User:Mr._Stradivarius provided a great deal of assistance in writting p.main()&lt;br /&gt;
&lt;br /&gt;
p.main() draw heavily from the following version of Template:Asbox of the English Wikipedia, authored primarily by User:Rich_Farmbrough&lt;br /&gt;
https://en.wikipedia.org/w/index.php?title=Template:Asbox&amp;amp;oldid=619510287&lt;br /&gt;
&lt;br /&gt;
p.templatepage() is derived from the following revision of Template:Asbox/templatepage, authored primarily by User:MSGJ&lt;br /&gt;
https://en.wikipedia.org/w/index.php?title=Template:Asbox/templatepage&amp;amp;oldid=632914791&lt;br /&gt;
&lt;br /&gt;
Both templates had significant contributions from numerous others listed in the revision history tab of their respective pages.&lt;br /&gt;
--]]&lt;br /&gt;
local WRAPPER_TEMPLATE, args = &amp;#039;Template:Article stub box&amp;#039;&lt;br /&gt;
-- TODO: update this instance of Asbox to Article stub box eventually&lt;br /&gt;
local templatestyles = &amp;#039;Module:Article stub box/styles.css&amp;#039;&lt;br /&gt;
local p, Buffer, stubCats = {&lt;br /&gt;
	--Prevents dupli-cats... get it? Maybe not?&lt;br /&gt;
	cats = setmetatable({}, {__newindex = function(t, i, v)&lt;br /&gt;
		if not rawget(t, i) then&lt;br /&gt;
			rawset(t, i, v)&lt;br /&gt;
			table.insert(t, i)&lt;br /&gt;
		end&lt;br /&gt;
	end}),&lt;br /&gt;
	--initializes variables required by both p.main and p.templatepage&lt;br /&gt;
	init = function(self, frame, page)&lt;br /&gt;
		args, page = args or require(&amp;#039;Module:Arguments&amp;#039;).getArgs(frame, {&lt;br /&gt;
			wrappers = WRAPPER_TEMPLATE&lt;br /&gt;
		}), page or mw.title.getCurrentTitle()&lt;br /&gt;
		--Ensures demo parameter will never affect category() output for articles&lt;br /&gt;
		self.demo = self.demo or page.namespace ~= 0 and args.demo&lt;br /&gt;
		return args, page&lt;br /&gt;
	end&lt;br /&gt;
}, require(&amp;#039;Module:Buffer&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
Formats category links. Stores them until called with cat.done=true&lt;br /&gt;
Takes multiple or single categories in the form of &amp;#039;cat&amp;#039;&lt;br /&gt;
or a table of strings and/or tables containing parts. (See below)&lt;br /&gt;
]]&lt;br /&gt;
local attention, catTag, catKey = Buffer&amp;#039;Stub message templates needing attention&amp;#039;, &amp;#039;[[Category:%s]]&amp;#039;, &amp;#039;%s|%s%s&amp;#039;&lt;br /&gt;
local function category(cat)&lt;br /&gt;
	for _, v in ipairs((tostring(cat) == cat or cat.t) and {cat} or cat) do&lt;br /&gt;
		--[[&lt;br /&gt;
		If v is a table:&lt;br /&gt;
			[1] = full category name; defaults to local attention if blank&lt;br /&gt;
			k = Category sort key. Prefix before v.t&lt;br /&gt;
			t = page.text or args.tempsort#; appended after k (or in its place if omitted). Required if v is not a string&lt;br /&gt;
		Basically the same as v = (v[1] or attention) .. &amp;#039; | &amp;#039; .. (v.k or &amp;#039;&amp;#039;) .. v.t&lt;br /&gt;
		]]&lt;br /&gt;
		if v and v ~= true then--reject v = nil, false, or true&lt;br /&gt;
			p.cats[catTag:format(tostring(v) == v and&lt;br /&gt;
				v&lt;br /&gt;
				or (v[1] and Buffer(v[1]) or attention):_in(v.k):_(v.t):_str(2, nil, nil, &amp;#039;|&amp;#039;)&lt;br /&gt;
			)] = true&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return cat.done and table.concat(p.cats, p.demo and &amp;#039; | &amp;#039; or nil) or &amp;#039;&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
Makes an ombox warning;&lt;br /&gt;
Takes table {ifNot = Boolean, text, {cat. sort key, cat. sort name}}&lt;br /&gt;
Will return an empty string instead when ifNot evaluates to true &lt;br /&gt;
]]&lt;br /&gt;
local function ombox(v)&lt;br /&gt;
	if v.ifNot then return end&lt;br /&gt;
	p.ombox = p.ombox or require(&amp;#039;Module:Message box&amp;#039;).ombox&lt;br /&gt;
	category{v[2]}&lt;br /&gt;
	return p.ombox{&lt;br /&gt;
		type = &amp;#039;content&amp;#039;,&lt;br /&gt;
		text = v[1]&lt;br /&gt;
	}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--[[&lt;br /&gt;
Unlike original template, module now takes unlimited cats! This function also performs&lt;br /&gt;
most stub category error checks except for the ombox for when main |category= is omitted (See p.template())&lt;br /&gt;
]]&lt;br /&gt;
local function catStub(page, pageDoc)&lt;br /&gt;
	stubCats = {missing = {}, v = {}}&lt;br /&gt;
	-- zwj and zwnj have semantical use in other other wikis, don&amp;#039;t remove them&lt;br /&gt;
	local zwj = &amp;#039;\226\128\141&amp;#039;  -- U+200D, E2 80 8D&lt;br /&gt;
	local zwnj = &amp;#039;\226\128\140&amp;#039; -- U+200C, E2 80 8C&lt;br /&gt;
	local disallowedUnicodeChars = &amp;#039;[^%w%p%s&amp;#039; .. zwj .. zwnj .. &amp;#039;]&amp;#039; -- for i18n we make this a separate string&lt;br /&gt;
	local code&lt;br /&gt;
	for k, _ in pairs(args) do&lt;br /&gt;
		--Find category parameters and store the number (main cat = &amp;#039;&amp;#039;)&lt;br /&gt;
		table.insert(stubCats, string.match(k, &amp;#039;^category(%d*)$&amp;#039;))&lt;br /&gt;
	end&lt;br /&gt;
	table.sort(stubCats)&lt;br /&gt;
	for k, v in ipairs(stubCats) do&lt;br /&gt;
		--Get category names and, if called by p.templatepage, the optional sort key&lt;br /&gt;
		local tsort, cat = args[&amp;#039;tempsort&amp;#039; .. v], mw.ustring.gsub(args[&amp;#039;category&amp;#039; .. v], disallowedUnicodeChars, &amp;#039;&amp;#039;)--remove all hidden unicode chars &lt;br /&gt;
		--Do not place template in main category if |tempsort = &amp;#039;no&amp;#039;. However, DO place articles of that template in the main category.&lt;br /&gt;
		table.insert(stubCats.v,&lt;br /&gt;
			 page and (--p.templatepage passes page; p.main does not, i.e. articles are categorized without sort keys.&lt;br /&gt;
				v==&amp;#039;&amp;#039; and tsort == &amp;#039;no&amp;#039;--if true, inserts &amp;#039;true&amp;#039; in table, which category() will reject&lt;br /&gt;
				or tsort and {cat, k = &amp;#039; &amp;#039;, t = tsort}&lt;br /&gt;
				or {cat, k = &amp;#039; *&amp;#039;, t = page.text}--note space in front of sort key&lt;br /&gt;
			)&lt;br /&gt;
			or cat&lt;br /&gt;
		)&lt;br /&gt;
		--Check category existance only if on the template page (i.e. stub documentation)&lt;br /&gt;
		if page then&lt;br /&gt;
			if not mw.title.new(&amp;#039;Category:&amp;#039; .. cat).exists then&lt;br /&gt;
				code = code or mw.html.create&amp;#039;code&amp;#039;:wikitext&amp;#039;|category&amp;#039;&lt;br /&gt;
				table.insert(stubCats.missing, tostring(mw.clone(code):wikitext(v)))&lt;br /&gt;
			end&lt;br /&gt;
			--[[&lt;br /&gt;
			Checks non-demo stub template for documentation and flags if doc is present.&lt;br /&gt;
			All stub cats names are checked and flagged if it does not match &amp;#039;Category: [] stub&amp;#039;.&lt;br /&gt;
			The main stub cat is exempt from the name check if the stub template has its own doc&lt;br /&gt;
			(presumably, this doc would have an explanation as to why the main stub cat is non-conforming).&lt;br /&gt;
			]]&lt;br /&gt;
			table.insert(stubCats.v, v == &amp;#039;&amp;#039; and not p.demo and pageDoc.exists and&lt;br /&gt;
				&amp;#039;Stub message templates with documentation subpages&amp;#039;&lt;br /&gt;
				or not cat:match&amp;#039; stubs$&amp;#039; and {k = &amp;#039;S&amp;#039;, t = page.text}&lt;br /&gt;
			)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	--Add category names after loop is completed&lt;br /&gt;
	category(stubCats.v)&lt;br /&gt;
	return #stubCats.missing &amp;gt; 0 and ombox{&lt;br /&gt;
		--Changed, original msg:&lt;br /&gt;
		--One or more of the stub categories defined in this template do not seem to exist!&lt;br /&gt;
		--Please double-check the parameters {{para|category}}, {{para|category1}} and {{para|category2}}.&lt;br /&gt;
		&amp;#039;The following parameter&amp;#039;&lt;br /&gt;
			.. (#stubCats.missing == 1 and &amp;#039; defines a stub category that does&amp;#039; or &amp;#039;s define stub categories that do&amp;#039;)&lt;br /&gt;
			.. &amp;#039; not exist: &amp;#039; .. mw.text.listToText(stubCats.missing),&lt;br /&gt;
		{k = &amp;#039;N&amp;#039;, t = page.text}&lt;br /&gt;
	}&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--Shows population of categories found by catStub(). Outputs demo values if none&lt;br /&gt;
local function population()&lt;br /&gt;
	local wikitext, base = {}, &amp;#039;* [[:Category:%s]] (population: %s)\n&amp;#039;&lt;br /&gt;
	if not args.category and stubCats[1] ~= false then&lt;br /&gt;
		table.insert(stubCats, 1, false)&lt;br /&gt;
	end&lt;br /&gt;
	for _, v in ipairs(stubCats) do&lt;br /&gt;
		table.insert(wikitext, base:format(&lt;br /&gt;
			v and args[&amp;#039;category&amp;#039; .. v] or &amp;#039;{{{category}}}&amp;#039;,&lt;br /&gt;
			v and mw.site.stats.pagesInCategory(args[&amp;#039;category&amp;#039; .. v], &amp;#039;all&amp;#039;) or 0&lt;br /&gt;
		))&lt;br /&gt;
	end&lt;br /&gt;
	return table.concat(wikitext)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--Includes standard stub documention and flags stub templates with bad parameter values.&lt;br /&gt;
function p.templatepage(frame, page)&lt;br /&gt;
	args, page = p:init(frame, page)&lt;br /&gt;
	local tStubDoc = mw.title.new&amp;#039;Template:Stub documentation&amp;#039;&lt;br /&gt;
	local pageDoc = page:subPageTitle(&amp;#039;doc&amp;#039;)&lt;br /&gt;
	--Reorganization note: Original Asbox alternates between outputting categories and checking on params |category#=.&lt;br /&gt;
	--Rather than checking multiple times and switching tasks, all stub category param operations have been rolled into catStub()&lt;br /&gt;
	return Buffer(&lt;br /&gt;
		ombox{--Show ombox warnings for missing args.&lt;br /&gt;
			ifNot = args.category,&lt;br /&gt;
			&amp;#039;The &amp;lt;code&amp;gt;|category&amp;lt;/code&amp;gt; parameter is not set. Please add an appropriate stub category.&amp;#039;,&lt;br /&gt;
			{k = &amp;#039;C&amp;#039;, t = page.text}&lt;br /&gt;
		})&lt;br /&gt;
		:_(ombox{&lt;br /&gt;
			ifNot = args.subject or args.article or args.qualifier,&lt;br /&gt;
			&amp;#039;This stub template contains no description! At least one of the parameters &amp;lt;code&amp;gt;|subject&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;|article&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;|qualifier&amp;lt;/code&amp;gt; must be defined.&amp;#039;,&lt;br /&gt;
			{k = &amp;#039;D&amp;#039;, t = page.text}&lt;br /&gt;
		})&lt;br /&gt;
		:_(catStub(page, pageDoc))--catStub() may also return an ombox if there are non-existing categories&lt;br /&gt;
		:_(category{&lt;br /&gt;
			done = p.demo ~= &amp;#039;doc&amp;#039;,--Outputs categories if not doc demo&lt;br /&gt;
			&amp;#039;Stub message templates&amp;#039;,&lt;br /&gt;
			args.icon and&lt;br /&gt;
				&amp;#039;Stub message templates using icon parameter&amp;#039;&lt;br /&gt;
				or args.image and (&lt;br /&gt;
					mw.title.new(&amp;#039;Media:&amp;#039; .. mw.text.split(args.image, &amp;#039;|&amp;#039;)[1]).exists--do nothing if exists. category() will reject true&lt;br /&gt;
					or {k = &amp;#039;B&amp;#039;, t = page.text}&lt;br /&gt;
				)&lt;br /&gt;
				or &amp;#039;Stub message templates without images&amp;#039;,&lt;br /&gt;
			args.imagealt and {k = &amp;#039;I&amp;#039;, t = page.text},&lt;br /&gt;
		})&lt;br /&gt;
		:_((not p.demo or p.demo == &amp;#039;doc&amp;#039;) and--Add standard stub template documentation&lt;br /&gt;
			require(&amp;#039;Module:Documentation&amp;#039;).main{&lt;br /&gt;
				content = Buffer(page.text ~= &amp;#039;Stub&amp;#039; and--This comparison performed in {{Asbox/stubtree}} before it invokes Module:Asbox stubtree&lt;br /&gt;
						-- TODO: update this instance of Asbox to Article stub box eventually&lt;br /&gt;
						require(&amp;#039;Module:Asbox stubtree&amp;#039;).subtree{args = {pagename = page.text}}&lt;br /&gt;
					)&lt;br /&gt;
					:_in&amp;#039;\n== About this template ==\nThis template is used to identify a&amp;#039;:_(args.subject):_&amp;#039;stub&amp;#039;:_(args.qualifier):_out&amp;#039; &amp;#039;--space&lt;br /&gt;
					:_&amp;#039;. It uses {{[[Template:Article stub box|article stub box]]}}, which is a meta-template designed to ease the process of creating and maintaining stub templates.\n=== Usage ===\nTyping &amp;#039;&lt;br /&gt;
					:_(mw.html.create&amp;#039;code&amp;#039;&lt;br /&gt;
						:wikitext( mw.text.nowiki( &amp;#039;{{&amp;#039; ), page.text == &amp;#039;Stub&amp;#039; and &amp;#039;stub&amp;#039; or page.text, &amp;#039;}}&amp;#039;)&lt;br /&gt;
					)&lt;br /&gt;
					:_&amp;#039; produces the message shown at the beginning, and adds the article to the following categor&amp;#039;&lt;br /&gt;
					:_(#stubCats &amp;gt; 1 and &amp;#039;ies&amp;#039; or &amp;#039;y&amp;#039;)&lt;br /&gt;
					:_&amp;#039;:\n&amp;#039;&lt;br /&gt;
					:_(population())&lt;br /&gt;
					:_(pageDoc.exists and--transclusion of /doc if it exists&lt;br /&gt;
						frame:expandTemplate{title = pageDoc.text}&lt;br /&gt;
					)&lt;br /&gt;
					:_&amp;#039;\n== General information ==\n&amp;#039;&lt;br /&gt;
					:_(frame:expandTemplate{title = tStubDoc.text})&lt;br /&gt;
					:_&amp;#039;\n\n&amp;#039;(),&lt;br /&gt;
				[&amp;#039;link box&amp;#039;] = Buffer&amp;#039;This documentation is automatically generated by [[Module:Article stub box]].&amp;#039;&lt;br /&gt;
					:_in&amp;#039;The general information is transcluded from [[Template:Stub documentation]]. &amp;#039;&lt;br /&gt;
						:_(mw.html.create&amp;#039;span&amp;#039;&lt;br /&gt;
							:cssText&amp;#039;font-size:smaller;font-style:normal;line-height:130%&amp;#039;&lt;br /&gt;
							:node((&amp;#039;([%s edit] | [%s history])&amp;#039;):format(&lt;br /&gt;
								tStubDoc:fullUrl(&amp;#039;action=edit&amp;#039;, &amp;#039;relative&amp;#039;),&lt;br /&gt;
								tStubDoc:fullUrl(&amp;#039;action=history&amp;#039;, &amp;#039;relative&amp;#039;)&lt;br /&gt;
							))&lt;br /&gt;
						)&lt;br /&gt;
						:_out()&lt;br /&gt;
					:_(page.protectionLevels.edit and page.protectionLevels.edit[1] == &amp;#039;sysop&amp;#039; and&lt;br /&gt;
						&amp;quot;This template is [[WP:PROTECT|fully protected]] and any [[WP:CAT|categories]] should be added to the template&amp;#039;s [&amp;quot;&lt;br /&gt;
						.. pageDoc:fullUrl(&amp;#039;action=edit&amp;amp;preload=Template:Category_interwiki/preload&amp;#039;, &amp;#039;relative&amp;#039;)&lt;br /&gt;
						.. &amp;#039;| /doc] subpage, which is not protected.&amp;#039;&lt;br /&gt;
					)&amp;#039; &amp;lt;br/&amp;gt;&amp;#039;&lt;br /&gt;
			}&lt;br /&gt;
		)()&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame, page)&lt;br /&gt;
	args, page = p:init(frame, page)&lt;br /&gt;
	local output = mw.html.create&amp;#039;div&amp;#039;&lt;br /&gt;
		:attr{role = &amp;#039;note&amp;#039;}&lt;br /&gt;
		:addClass&amp;#039;metadata plainlinks asbox stub&amp;#039;&lt;br /&gt;
		:tag&amp;#039;table&amp;#039;&lt;br /&gt;
			:attr{role = &amp;#039;presentation&amp;#039;}&lt;br /&gt;
			:tag&amp;#039;tr&amp;#039;&lt;br /&gt;
				:addClass&amp;#039;noresize&amp;#039;&lt;br /&gt;
				:node((args.icon or args.image) and&lt;br /&gt;
					mw.html.create&amp;#039;td&amp;#039;&lt;br /&gt;
						:wikitext(args.icon or (&amp;#039;[[File:%s|%spx|alt=%s]]&amp;#039;):format(&lt;br /&gt;
							args.image or &amp;#039;&amp;#039;,&lt;br /&gt;
							args.pix or &amp;#039;40x30&amp;#039;,&lt;br /&gt;
							args.imagealt or &amp;#039;Stub icon&amp;#039;&lt;br /&gt;
						))&lt;br /&gt;
				)&lt;br /&gt;
				:tag&amp;#039;td&amp;#039;&lt;br /&gt;
					:tag&amp;#039;p&amp;#039;&lt;br /&gt;
						:addClass&amp;#039;asbox-body&amp;#039;&lt;br /&gt;
						:wikitext(&lt;br /&gt;
							Buffer&amp;#039;This&amp;#039;:_(args.subject):_(args.article or &amp;#039;article&amp;#039;):_(args.qualifier)&amp;#039; &amp;#039;,--space&lt;br /&gt;
							&amp;#039; is a [[Wikipedia:stub|stub]]. You can help Wikipedia by [&amp;#039;,&lt;br /&gt;
							page:fullUrl(&amp;#039;action=edit&amp;#039;, &amp;#039;relative&amp;#039;),&lt;br /&gt;
							&amp;#039; expanding it].&amp;#039;&lt;br /&gt;
						)&lt;br /&gt;
					:done()&lt;br /&gt;
					:node(args.note and&lt;br /&gt;
						mw.html.create()&lt;br /&gt;
							:tag&amp;#039;p&amp;#039;&lt;br /&gt;
								:addClass&amp;#039;asbox-note&amp;#039;&lt;br /&gt;
								:wikitext(args.note)&lt;br /&gt;
							:done()&lt;br /&gt;
					)&lt;br /&gt;
		:allDone()&lt;br /&gt;
		:node(args.name and&lt;br /&gt;
			require&amp;#039;Module:Navbar&amp;#039;._navbar{&lt;br /&gt;
				args.name,&lt;br /&gt;
				mini = &amp;#039;yes&amp;#039;,&lt;br /&gt;
			}&lt;br /&gt;
			)&lt;br /&gt;
	--[[&lt;br /&gt;
	Stub categories for templates include a sort key; this ensures that all stub tags appear at the beginning of their respective categories.&lt;br /&gt;
	Articles using the template do not need a sort key since they have unique names.&lt;br /&gt;
	When p.demo equals &amp;#039;doc&amp;#039;, the demo stub categories will appear as those for a stub template.&lt;br /&gt;
	Otherwise, any non-nil p.demo will emulate article space categories (plus any error cats unless set to &amp;#039;art&amp;#039;)&lt;br /&gt;
	]]&lt;br /&gt;
	if page.namespace == 0 then -- Main namespace&lt;br /&gt;
		category&amp;#039;All stub articles&amp;#039;&lt;br /&gt;
		catStub()&lt;br /&gt;
	elseif p.demo then&lt;br /&gt;
		if p.demo ~= &amp;#039;doc&amp;#039; then catStub() end&lt;br /&gt;
		--Unless p.demo is set to &amp;#039;art&amp;#039;, it will also include error categories normally only shown on&lt;br /&gt;
		--the template but not in the article. The elseif after namespace == 0 means demo cats will never show in article space.&lt;br /&gt;
		p.demodoc = p.demo ~= &amp;#039;art&amp;#039; and p.templatepage(frame, page)&lt;br /&gt;
		output = mw.html.create()&lt;br /&gt;
			:node(output)&lt;br /&gt;
			:tag&amp;#039;small&amp;#039;:wikitext(&lt;br /&gt;
				&amp;#039;Demo categories: &amp;#039;,&lt;br /&gt;
				(category{done = true}:gsub(&amp;#039;(%[%[)(Category:)([^|%]]-)(%|)&amp;#039;, &amp;#039;%1%2%3|%2%3%4&amp;#039;):gsub(&amp;#039;(%[%[)(Category:)&amp;#039;, &amp;#039;%1:%2&amp;#039;))&lt;br /&gt;
			):done()&lt;br /&gt;
			:wikitext(p.demo == &amp;#039;doc&amp;#039; and p.demodoc or nil)&lt;br /&gt;
	else&lt;br /&gt;
		--Checks for valid name; emulates original template&amp;#039;s check using {{FULLPAGENAME:{{{name|}}}}}&lt;br /&gt;
		local normalizedName = mw.title.new(args.name or &amp;#039;&amp;#039;)&lt;br /&gt;
		if normalizedName and normalizedName.fullText == page.fullText then&lt;br /&gt;
			output = mw.html.create():node(output):wikitext(p.templatepage(frame, page))&lt;br /&gt;
		elseif not page.isSubpage and page.namespace == 10 then-- Template namespace and not a subpage&lt;br /&gt;
			category{{k = args.name and &amp;#039;E&amp;#039; or &amp;#039;W&amp;#039;, t = page.text}}&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return frame:extensionTag{ name = &amp;#039;templatestyles&amp;#039;, args = { src = templatestyles} } .. tostring(output:wikitext(not p.demo and category{done = true} or nil))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Wikipedia&gt;Anomie</name></author>
	</entry>
</feed>