<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ADisambiguation%2Fsandbox</id>
	<title>Module:Disambiguation/sandbox - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ADisambiguation%2Fsandbox"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Disambiguation/sandbox&amp;action=history"/>
	<updated>2026-04-16T01:46:21Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://stockhub.co/index.php?title=Module:Disambiguation/sandbox&amp;diff=135988&amp;oldid=prev</id>
		<title>imported&gt;Izno: I agree, but that pattern isn&#039;t going to catch the longer title because the find basically looks for {{pattern}} (nor does the &quot;[%w_%s]-%f[%w][Dd]isam[%w]-&quot; pattern which gets close). merge two school ones</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Disambiguation/sandbox&amp;diff=135988&amp;oldid=prev"/>
		<updated>2020-10-29T20:05:59Z</updated>

		<summary type="html">&lt;p&gt;I agree, but that pattern isn&amp;#039;t going to catch the longer title because the find basically looks for {{pattern}} (nor does the &amp;quot;[%w_%s]-%f[%w][Dd]isam[%w]-&amp;quot; pattern which gets close). merge two school ones&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
local mRedirect = require(&amp;#039;Module:Redirect&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
local disambigTemplates = {&lt;br /&gt;
	&amp;quot;[Dd][Aa][Bb]&amp;quot;,&lt;br /&gt;
	&amp;quot;[Dd]big&amp;quot;,&lt;br /&gt;
	&amp;quot;[Dd]is&amp;quot;,&lt;br /&gt;
	&amp;quot;[Dd]isambiguation&amp;quot;,&lt;br /&gt;
	&amp;quot;[%w_%s]-%f[%w][Dd]isam[%w]-&amp;quot;,&lt;br /&gt;
	&amp;quot;[Gg]eodis&amp;quot;,&lt;br /&gt;
	&amp;quot;[Hh][Nn][Dd][Ii][Ss]&amp;quot;,&lt;br /&gt;
	&amp;quot;[Ll]etter%-Number Combination Disambiguation&amp;quot;,&lt;br /&gt;
	&amp;quot;[Mm]il%-unit%-dis&amp;quot;,&lt;br /&gt;
	&amp;quot;[Nn]umberdis&amp;quot;,&lt;br /&gt;
	&amp;quot;[Ss]choold[ai][bs]&amp;quot;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
p.isDisambiguation = function(content)&lt;br /&gt;
	-- false if there is no content&lt;br /&gt;
	if content == nil then return false end&lt;br /&gt;
	&lt;br /&gt;
	-- redirects are not disambiguation pages&lt;br /&gt;
	if mRedirect.getTargetFromText(content) ~= nil then return false end&lt;br /&gt;
	&lt;br /&gt;
	-- check for disambiguation templates in the content&lt;br /&gt;
	for _i, v in ipairs(disambigTemplates) do&lt;br /&gt;
		if mw.ustring.find(content, &amp;quot;{{%s*&amp;quot;.. v .. &amp;quot;%s*%f[|}]&amp;quot;) ~= nil then&lt;br /&gt;
			return true&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- check for magic word&lt;br /&gt;
	if mw.ustring.find(content, &amp;quot;__DISAMBIG__&amp;quot;, 1, true) ~= nil then&lt;br /&gt;
		return true&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return false&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
p._isDisambiguationPage = function(page)&lt;br /&gt;
	-- Look &amp;quot;(disambiguation)&amp;quot; in the title&lt;br /&gt;
	if mw.ustring.find(page, &amp;quot;(disambiguation)&amp;quot;,0,true) ~= nil then&lt;br /&gt;
		return true;&lt;br /&gt;
	end&lt;br /&gt;
	-- Look for disamiguation template in page content&lt;br /&gt;
	local title = mw.title.new(page)&lt;br /&gt;
	if not title then return false end&lt;br /&gt;
	local content = title:getContent()&lt;br /&gt;
	return p.isDisambiguation(content)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- Entry points for templates&lt;br /&gt;
p.isDisambiguationPage = function(frame)&lt;br /&gt;
	local title = frame.args[1]&lt;br /&gt;
	return p._isDisambiguationPage(title) and &amp;quot;yes&amp;quot; or &amp;quot;&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;Izno</name></author>
	</entry>
</feed>