﻿<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://scholarlywiki.org/index.php?action=history&amp;feed=atom&amp;title=Module%3ARedirect-distinguish</id>
	<title>Module:Redirect-distinguish - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://scholarlywiki.org/index.php?action=history&amp;feed=atom&amp;title=Module%3ARedirect-distinguish"/>
	<link rel="alternate" type="text/html" href="https://scholarlywiki.org/index.php?title=Module:Redirect-distinguish&amp;action=history"/>
	<updated>2026-05-14T04:31:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>https://scholarlywiki.org/index.php?title=Module:Redirect-distinguish&amp;diff=1839&amp;oldid=prev</id>
		<title>WikiHarold: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://scholarlywiki.org/index.php?title=Module:Redirect-distinguish&amp;diff=1839&amp;oldid=prev"/>
		<updated>2019-11-16T15:50:01Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local mHatnote = require(&amp;#039;Module:Hatnote&amp;#039;)&lt;br /&gt;
local mHatlist = require(&amp;#039;Module:Hatnote list&amp;#039;)&lt;br /&gt;
local mArguments --initialize lazily&lt;br /&gt;
local mTableTools = require(&amp;#039;Module:TableTools&amp;#039;)&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.redirectDistinguish (frame)&lt;br /&gt;
	mArguments = require(&amp;#039;Module:Arguments&amp;#039;)&lt;br /&gt;
	local args = mArguments.getArgs(frame)&lt;br /&gt;
	return p._redirectDistinguish(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._redirectDistinguish(args)&lt;br /&gt;
	if not args[1] then&lt;br /&gt;
		return mHatnote.makeWikitextError(&lt;br /&gt;
			&amp;#039;no redirect supplied&amp;#039;,&lt;br /&gt;
			&amp;#039;Template:Redirect-distinguish&amp;#039;,&lt;br /&gt;
			args.category&lt;br /&gt;
		)&lt;br /&gt;
	end&lt;br /&gt;
	local redirectTitle = mw.title.new(args[1])&lt;br /&gt;
	if redirectTitle and redirectTitle.exists then&lt;br /&gt;
		if not redirectTitle.isRedirect then&lt;br /&gt;
			args[1] = args[1] .. &amp;#039;[[Category:Articles with redirect hatnotes needing review]]&amp;#039;&lt;br /&gt;
		end&lt;br /&gt;
	elseif not string.match(args[1], &amp;#039;REDIRECT%d+&amp;#039;) and not args[1] == &amp;#039;TERM&amp;#039; then&lt;br /&gt;
		args[1] = args[1] .. &amp;#039;[[Category:Missing redirects]]&amp;#039;&lt;br /&gt;
	end&lt;br /&gt;
	if not args[2] then&lt;br /&gt;
		return mHatnote.makeWikitextError(&lt;br /&gt;
			&amp;#039;no page to be distinguished supplied&amp;#039;,&lt;br /&gt;
			&amp;#039;Template:Redirect-distinguish&amp;#039;,&lt;br /&gt;
			args.category&lt;br /&gt;
		)&lt;br /&gt;
	end&lt;br /&gt;
	args = mTableTools.compressSparseArray(args)&lt;br /&gt;
	--Assignment by removal here makes for convenient concatenation later&lt;br /&gt;
	local redirect = table.remove(args, 1)&lt;br /&gt;
	local text = string.format(&lt;br /&gt;
		&amp;#039;&amp;quot;%s&amp;quot; redirects here. It is not to be confused with %s.&amp;#039;,&lt;br /&gt;
		redirect,&lt;br /&gt;
		mHatlist.orList(args, true)&lt;br /&gt;
	)&lt;br /&gt;
	return mHatnote._hatnote(text)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>WikiHarold</name></author>
	</entry>
</feed>