<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.limswiki.org/index.php?action=history&amp;feed=atom&amp;title=Module%3AIf_empty</id>
	<title>Module:If empty - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.limswiki.org/index.php?action=history&amp;feed=atom&amp;title=Module%3AIf_empty"/>
	<link rel="alternate" type="text/html" href="https://www.limswiki.org/index.php?title=Module:If_empty&amp;action=history"/>
	<updated>2026-04-04T15:37:58Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.36.1</generator>
	<entry>
		<id>https://www.limswiki.org/index.php?title=Module:If_empty&amp;diff=21016&amp;oldid=prev</id>
		<title>Shawndouglas: Created as needed.</title>
		<link rel="alternate" type="text/html" href="https://www.limswiki.org/index.php?title=Module:If_empty&amp;diff=21016&amp;oldid=prev"/>
		<updated>2015-03-02T23:56:20Z</updated>

		<summary type="html">&lt;p&gt;Created as needed.&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;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local args = require('Module:Arguments').getArgs(frame, {wrappers = 'Template:If empty', removeBlanks = false})&lt;br /&gt;
&lt;br /&gt;
	-- For backwards compatibility reasons, the first 8 parameters can be unset instead of being blank,&lt;br /&gt;
	-- even though there's really no legitimate use case for this. At some point, this will be removed.&lt;br /&gt;
	local lowestNil = math.huge&lt;br /&gt;
	for i = 8,1,-1 do&lt;br /&gt;
		if args[i] == nil then&lt;br /&gt;
			args[i] = ''&lt;br /&gt;
			lowestNil = i&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	for k,v in ipairs(args) do&lt;br /&gt;
		if v ~= '' then&lt;br /&gt;
			if lowestNil &amp;lt; k then&lt;br /&gt;
				-- If any uses of this template depend on the behavior above, add them to a tracking category.&lt;br /&gt;
				-- This is a rather fragile, convoluted, hacky way to do it, but it ensures that this module's output won't be modified&lt;br /&gt;
				-- by it.&lt;br /&gt;
				frame:extensionTag('ref', '[[Category:Instances of Template:If_empty missing arguments]]', {group = 'TrackingCategory'})&lt;br /&gt;
				frame:extensionTag('references', '', {group = 'TrackingCategory'})&lt;br /&gt;
			end&lt;br /&gt;
			return v&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Shawndouglas</name></author>
	</entry>
</feed>