<?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%3ASplit_article</id>
	<title>Module:Split article - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASplit_article"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Split_article&amp;action=history"/>
	<updated>2026-06-07T22:35:56Z</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:Split_article&amp;diff=146865&amp;oldid=prev</id>
		<title>imported&gt;Chlod: fixing misnested tag (td without tr), rm logObject</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Split_article&amp;diff=146865&amp;oldid=prev"/>
		<updated>2022-08-18T03:06:26Z</updated>

		<summary type="html">&lt;p&gt;fixing misnested tag (td without tr), rm logObject&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local MessageBox = require(&amp;quot;Module:Message box&amp;quot;)&lt;br /&gt;
local yesno = require(&amp;quot;Module:Yesno&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
local function demoCheck(args)&lt;br /&gt;
	return yesno(args[&amp;quot;demo&amp;quot;]) or yesno(args[&amp;quot;nocat&amp;quot;])&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function showWarning(text, nocat)&lt;br /&gt;
	mw.addWarning(text)&lt;br /&gt;
	return nocat and &amp;quot;&amp;quot; or &amp;quot;[[Category:Pages with split article warnings]]&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function delink(text)&lt;br /&gt;
	if text == nil then&lt;br /&gt;
		return nil&lt;br /&gt;
	end&lt;br /&gt;
	return string.gsub(string.gsub(require(&amp;quot;Module:Delink&amp;quot;)._delink{text}, &amp;quot;%[%[&amp;quot;, &amp;quot;&amp;quot;), &amp;quot;%]%]&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function showError(text, nocat)&lt;br /&gt;
	return string.format(&lt;br /&gt;
		&amp;quot;%s%s %s&amp;quot;,&lt;br /&gt;
		nocat and &amp;quot;&amp;quot; or &amp;quot;[[Category:Pages with split article errors]] &amp;quot;,&lt;br /&gt;
		tostring(&lt;br /&gt;
			mw.html.create(&amp;quot;span&amp;quot;)&lt;br /&gt;
				:css(&amp;quot;color&amp;quot;, &amp;quot;red&amp;quot;)&lt;br /&gt;
				:css(&amp;quot;font-weight&amp;quot;, &amp;quot;bold&amp;quot;)&lt;br /&gt;
				:wikitext(&amp;quot;Error:&amp;quot;)&lt;br /&gt;
		),&lt;br /&gt;
		text&lt;br /&gt;
	)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function singleText(args)&lt;br /&gt;
	local text = &amp;quot;&amp;quot;&lt;br /&gt;
	-- from1 also included in case someone filed the template improperly&lt;br /&gt;
	local from = delink(args[&amp;quot;from&amp;quot;] or args[&amp;quot;from1&amp;quot;]) or mw.title.getCurrentTitle().subjectPageTitle.prefixedText&lt;br /&gt;
	local fromTalk = mw.title.new(from).talkPageTitle.prefixedText&lt;br /&gt;
	&lt;br /&gt;
	if args[&amp;quot;from1&amp;quot;] then&lt;br /&gt;
		text = text .. showWarning(&lt;br /&gt;
			&amp;quot;&amp;lt;code&amp;gt;from&amp;lt;/code&amp;gt; is not a row-based parameter. Use &amp;lt;code&amp;gt;from&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;from1&amp;lt;/code&amp;gt;.&amp;quot;,&lt;br /&gt;
			demoCheck(args)&lt;br /&gt;
		)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	-- Row-based parameters&lt;br /&gt;
	local to = delink(args[&amp;quot;to&amp;quot;] or args[&amp;quot;to1&amp;quot;])&lt;br /&gt;
	local diff = args[&amp;quot;diff&amp;quot;] or args[&amp;quot;diff1&amp;quot;]&lt;br /&gt;
	local date = args[&amp;quot;date&amp;quot;] or args[&amp;quot;date1&amp;quot;]&lt;br /&gt;
	local from_oldid = args[&amp;quot;from_oldid&amp;quot;] or args[&amp;quot;from_oldid1&amp;quot;]&lt;br /&gt;
    if to == nil then&lt;br /&gt;
    	return showError(&amp;quot;Target page was not specified with &amp;lt;code&amp;gt;to&amp;lt;/code&amp;gt;.&amp;quot;, demoCheck(args))&lt;br /&gt;
	end&lt;br /&gt;
	if date == nil then&lt;br /&gt;
		text = text .. showWarning(&amp;quot;Split date was not specified with &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;. This may cause an error in the future.&amp;quot;, demoCheck(args))&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	text = string.format(&amp;quot;Material from [[%s]] was split to [[%s]]&amp;quot;, from, to, date)&lt;br /&gt;
	if diff ~= nil and date ~= nil then&lt;br /&gt;
		if diff:match(&amp;quot;^[0123456789/]+$&amp;quot;) then&lt;br /&gt;
			text = string.format(&amp;quot;%s on [[Special:Diff/%s|%s]]&amp;quot;, text, diff, date)&lt;br /&gt;
		else&lt;br /&gt;
			text = string.format(&amp;quot;%s on [%s %s]&amp;quot;, text, diff, date)&lt;br /&gt;
		end&lt;br /&gt;
	elseif date ~= nil then&lt;br /&gt;
		text = string.format(&amp;quot;%s on %s&amp;quot;, text, date)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if from_oldid ~= nil then&lt;br /&gt;
		if from_oldid:match(&amp;quot;^[0123456789/]+$&amp;quot;) then&lt;br /&gt;
			text = string.format(&amp;quot;%s from [[Special:Diff/%s|this version]]&amp;quot;, text, from_oldid)&lt;br /&gt;
		else&lt;br /&gt;
			text = string.format(&amp;quot;%s from [%s this version]&amp;quot;, text, from_oldid)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	text = string.format(&lt;br /&gt;
		&amp;quot;%s. The former page&amp;#039;s [[Special:PageHistory/%s|history]] now serves to &amp;quot;..&lt;br /&gt;
		&amp;quot;[[Wikipedia:Copying within Wikipedia|provide attribution]] for that content &amp;quot;..&lt;br /&gt;
		&amp;quot;in the latter page, and it must not be deleted so long as the latter page &amp;quot;..&lt;br /&gt;
		&amp;quot;exists. Please leave this template in place to link the article histories &amp;quot;..&lt;br /&gt;
		&amp;quot;and preserve this attribution.&amp;quot;, &lt;br /&gt;
		text, from&lt;br /&gt;
	)&lt;br /&gt;
	&lt;br /&gt;
	if fromTalk ~= mw.title.getCurrentTitle().prefixedText then&lt;br /&gt;
		 text = string.format(&lt;br /&gt;
		 	&amp;quot;%s The former page&amp;#039;s talk page can be accessed at [[%s]].&amp;quot;,&lt;br /&gt;
		 	text, fromTalk&lt;br /&gt;
	 	)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return text&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function row(args, i)&lt;br /&gt;
	local to = delink(args[&amp;quot;to&amp;quot; .. i] or (i == 1 and args[&amp;quot;to&amp;quot;] or nil))&lt;br /&gt;
	local toTalk = mw.title.new(delink(to)).subjectPageTitle.prefixedText&lt;br /&gt;
	local diff = args[&amp;quot;diff&amp;quot; .. i] or (i == 1 and args[&amp;quot;diff&amp;quot;] or nil)&lt;br /&gt;
	local date = args[&amp;quot;date&amp;quot; .. i] or (i == 1 and args[&amp;quot;date&amp;quot;] or nil)&lt;br /&gt;
	local from_oldid = args[&amp;quot;from_oldid&amp;quot; .. i] or (i == 1 and args[&amp;quot;from_oldid&amp;quot;] or nil)&lt;br /&gt;
	if date == nil then&lt;br /&gt;
		text = text .. showWarning(string.format(&lt;br /&gt;
			&amp;quot;Split date for \&amp;quot;%s\&amp;quot; (&amp;lt;code&amp;gt;to%s&amp;lt;/code&amp;gt;) was not specified with &amp;lt;code&amp;gt;date&amp;lt;/code&amp;gt;. This may cause an error in the future.&amp;quot;,&lt;br /&gt;
			to, i&lt;br /&gt;
		), demoCheck(args))&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local rowText = string.format(&lt;br /&gt;
		&amp;quot;[[%s]] ([[%s|talk]] | [[Special:PageHistory/%s|history]])&amp;quot;,&lt;br /&gt;
		to, toTalk, to, date, diff&lt;br /&gt;
	)&lt;br /&gt;
	if diff ~= nil and date ~= nil then&lt;br /&gt;
		if diff:match(&amp;quot;^[0123456789/]+$&amp;quot;) then&lt;br /&gt;
			rowText = string.format(&amp;quot;%s on [[Special:Diff/%s|%s]]&amp;quot;, rowText, diff, date)&lt;br /&gt;
		else&lt;br /&gt;
			rowText = string.format(&amp;quot;%s on [%s %s]&amp;quot;, rowText, diff, date)&lt;br /&gt;
		end&lt;br /&gt;
	elseif date ~= nil then&lt;br /&gt;
		rowText = string.format(&amp;quot;%s on %s&amp;quot;, rowText, date)&lt;br /&gt;
	end&lt;br /&gt;
	if from_oldid ~= nil then&lt;br /&gt;
		if from_oldid:match(&amp;quot;^%d+$&amp;quot;) then&lt;br /&gt;
			rowText = string.format(&amp;quot;%s from [[Special:Diff/%s|this version]]&amp;quot;, rowText, from_oldid)&lt;br /&gt;
		else&lt;br /&gt;
			rowText = string.format(&amp;quot;%s from [%s this version]&amp;quot;, rowText, from_oldid)&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return mw.html.create(&amp;quot;li&amp;quot;):wikitext(rowText)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function multiText(args)&lt;br /&gt;
	local text = &amp;quot;&amp;quot;&lt;br /&gt;
	-- from1 also included in case someone filed the template improperly&lt;br /&gt;
	local from = delink(args[&amp;quot;from&amp;quot;] or args[&amp;quot;from1&amp;quot;]) or mw.title.getCurrentTitle().subjectPageTitle.prefixedText&lt;br /&gt;
	local fromTalk = mw.title.new(delink(from)).talkPageTitle.prefixedText&lt;br /&gt;
	local collapse = tonumber(args[&amp;quot;collapse&amp;quot;]) or yesno(args[&amp;quot;collapse&amp;quot;])&lt;br /&gt;
	if args[&amp;quot;from1&amp;quot;] then&lt;br /&gt;
		text = text .. showWarning(&lt;br /&gt;
			&amp;quot;&amp;lt;code&amp;gt;from&amp;lt;/code&amp;gt; is not a row-based parameter. Use &amp;lt;code&amp;gt;from&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;from1&amp;lt;/code&amp;gt;.&amp;quot;,&lt;br /&gt;
			demoCheck(args)&lt;br /&gt;
		)&lt;br /&gt;
	end&lt;br /&gt;
	if args[&amp;quot;from_oldid1&amp;quot;] then&lt;br /&gt;
		text = text .. showWarning(&lt;br /&gt;
			&amp;quot;&amp;lt;code&amp;gt;from_oldid&amp;lt;/code&amp;gt; is not a row-based parameter. Use &amp;lt;code&amp;gt;from_oldid&amp;lt;/code&amp;gt; instead of &amp;lt;code&amp;gt;from_oldid1&amp;lt;/code&amp;gt;.&amp;quot;,&lt;br /&gt;
			demoCheck(args)&lt;br /&gt;
		)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	text = string.format(&lt;br /&gt;
		&amp;quot;Material from [[%s]] was split to other pages. The former page&amp;#039;s &amp;quot;..&lt;br /&gt;
		&amp;quot;[[Special:PageHistory/%s|history]] now serves to &amp;quot;..&lt;br /&gt;
		&amp;quot;[[Wikipedia:Copying within Wikipedia|provide attribution]] for that content &amp;quot;..&lt;br /&gt;
		&amp;quot;in the latter pages, and it must not be deleted so long as the latter pages &amp;quot;..&lt;br /&gt;
		&amp;quot;exist. Please leave this template in place to link the article histories &amp;quot;..&lt;br /&gt;
		&amp;quot;and preserve this attribution.&amp;quot;, from, from&lt;br /&gt;
	)&lt;br /&gt;
	&lt;br /&gt;
	local ul = mw.html.create(&amp;quot;ul&amp;quot;)&lt;br /&gt;
	local ul2&lt;br /&gt;
	local target = ul&lt;br /&gt;
	&lt;br /&gt;
	-- Row-based parameters&lt;br /&gt;
	local i = 1&lt;br /&gt;
	while args[&amp;quot;to&amp;quot; .. i] or (i == 1 and args[&amp;quot;to&amp;quot;]) do&lt;br /&gt;
		-- Swap out ul with collapsible table if collapsible&lt;br /&gt;
		if collapse == true and i == 1 then&lt;br /&gt;
			-- Only on first run&lt;br /&gt;
			target = mw.html.create(&amp;quot;table&amp;quot;)&lt;br /&gt;
				:attr(&amp;quot;class&amp;quot;, &amp;quot;mw-collapsible mw-collapsed&amp;quot;)&lt;br /&gt;
				:attr(&amp;quot;style&amp;quot;, &amp;quot;width:100%; background-color: #f8eaba;&amp;quot;)&lt;br /&gt;
				:node(mw.html.create(&amp;quot;tr&amp;quot;)&lt;br /&gt;
					:node(mw.html.create(&amp;quot;th&amp;quot;)&lt;br /&gt;
						:wikitext(&amp;quot;Page splits&amp;quot;)&lt;br /&gt;
					)&lt;br /&gt;
				)&lt;br /&gt;
				:node(mw.html.create(&amp;quot;td&amp;quot;):node(ul))&lt;br /&gt;
		elseif collapse == (i - 1) then&lt;br /&gt;
			ul2 = ul&lt;br /&gt;
			ul = mw.html.create(&amp;quot;ul&amp;quot;)&lt;br /&gt;
			-- Only once threshold has been reached&lt;br /&gt;
			target = mw.html.create(&amp;quot;table&amp;quot;)&lt;br /&gt;
				:attr(&amp;quot;class&amp;quot;, &amp;quot;mw-collapsible mw-collapsed&amp;quot;)&lt;br /&gt;
				:attr(&amp;quot;style&amp;quot;, &amp;quot;width:100%; background-color: #f8eaba;&amp;quot;)&lt;br /&gt;
				:node(mw.html.create(&amp;quot;tr&amp;quot;)&lt;br /&gt;
					:node(mw.html.create(&amp;quot;th&amp;quot;)&lt;br /&gt;
						:wikitext(&amp;quot;Other page splits&amp;quot;)&lt;br /&gt;
					)&lt;br /&gt;
				)&lt;br /&gt;
				:node(mw.html.create(&amp;quot;tr&amp;quot;)&lt;br /&gt;
					:node(mw.html.create(&amp;quot;td&amp;quot;):node(ul))&lt;br /&gt;
				)&lt;br /&gt;
		end&lt;br /&gt;
		&lt;br /&gt;
		ul:node(row(args, i))&lt;br /&gt;
		i = i + 1&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if fromTalk ~= mw.title.getCurrentTitle().prefixedText then&lt;br /&gt;
		 text = string.format(&lt;br /&gt;
		 	&amp;quot;%s The former page&amp;#039;s talk page can be accessed at [[%s]].&amp;quot;,&lt;br /&gt;
		 	text, fromTalk&lt;br /&gt;
	 	)&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	text = text .. &amp;quot; &amp;quot; .. tostring(ul2 or &amp;quot;&amp;quot;) .. tostring(target)&lt;br /&gt;
	&lt;br /&gt;
	return text&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function bannerText(args)&lt;br /&gt;
	-- Checks if there are multiple rows&lt;br /&gt;
	local text&lt;br /&gt;
	if args[&amp;quot;to2&amp;quot;] ~= nil and ((args[&amp;quot;to1&amp;quot;] or args[&amp;quot;to&amp;quot;]) ~= nil) then&lt;br /&gt;
		text = multiText(args) --.. categories(args,true)&lt;br /&gt;
	else&lt;br /&gt;
		text = singleText(args) --.. categories(args,false)&lt;br /&gt;
	end&lt;br /&gt;
	return text&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.renderBanner(args)&lt;br /&gt;
	return MessageBox.main(&amp;#039;tmbox&amp;#039;, {&lt;br /&gt;
		name = &amp;quot;split-article&amp;quot;,&lt;br /&gt;
		small = args[&amp;quot;small&amp;quot;],&lt;br /&gt;
		image = &amp;#039;[[File:Split-arrows.svg|50px]]&amp;#039;,&lt;br /&gt;
		text = bannerText(args)&lt;br /&gt;
	})&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local getArgs = require(&amp;#039;Module:Arguments&amp;#039;).getArgs&lt;br /&gt;
	local args = getArgs(frame, {&lt;br /&gt;
		trim = true,&lt;br /&gt;
		removeBlanks = true&lt;br /&gt;
	})&lt;br /&gt;
	return p.renderBanner(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;Chlod</name></author>
	</entry>
</feed>