<?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%3AIndent</id>
	<title>Module:Indent - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3AIndent"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Indent&amp;action=history"/>
	<updated>2026-05-07T00:40:07Z</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:Indent&amp;diff=136891&amp;oldid=prev</id>
		<title>imported&gt;MusikBot II: Changed protection settings for &quot;Module:Indent&quot;: High-risk template or module: 3892 transclusions (more info) ([Edit=Require extended confirmed access] (indefinite) [Move=Require extended confirmed access] (indefinite))</title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Indent&amp;diff=136891&amp;oldid=prev"/>
		<updated>2022-02-22T18:00:05Z</updated>

		<summary type="html">&lt;p&gt;Changed protection settings for &amp;quot;&lt;a href=&quot;/research/Module:Indent&quot; title=&quot;Module:Indent&quot;&gt;Module:Indent&lt;/a&gt;&amp;quot;: &lt;a href=&quot;https://en.wikipedia.org/wiki/High-risk_templates&quot; class=&quot;extiw&quot; title=&quot;wikipedia:High-risk templates&quot;&gt;High-risk template or module&lt;/a&gt;: 3892 transclusions (&lt;a href=&quot;/index.php?title=User:MusikBot_II/TemplateProtector&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User:MusikBot II/TemplateProtector (page does not exist)&quot;&gt;more info&lt;/a&gt;) ([Edit=Require extended confirmed access] (indefinite) [Move=Require extended confirmed access] (indefinite))&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.indent(frame)&lt;br /&gt;
    -- Trim whitespace from the arguments and remove blank values.&lt;br /&gt;
    local args = {}&lt;br /&gt;
    if type(frame.args) == &amp;#039;table&amp;#039; then&lt;br /&gt;
        for k, v in pairs( frame.args ) do&lt;br /&gt;
            v = mw.text.trim(v)&lt;br /&gt;
            if v ~= &amp;#039;&amp;#039; then&lt;br /&gt;
                args[k] = v&lt;br /&gt;
            end&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    -- Set variables.&lt;br /&gt;
    local indent = tonumber( args[1] )&lt;br /&gt;
    local br = args[2]&lt;br /&gt;
    local ret = &amp;#039;&amp;#039;&lt;br /&gt;
    &lt;br /&gt;
    -- Insert line breaks to match the functionality of the original template.&lt;br /&gt;
    -- If &amp;quot;br&amp;quot; is set, we need two line breaks; if not, we just need one.&lt;br /&gt;
    if br then&lt;br /&gt;
        ret = ret .. &amp;#039;&amp;lt;br /&amp;gt;&amp;#039; &lt;br /&gt;
    end&lt;br /&gt;
    ret = ret .. &amp;#039;&amp;lt;br /&amp;gt;&amp;#039;&lt;br /&gt;
    &lt;br /&gt;
    -- Control for bad or zero input. If found, output the line breaks only, &lt;br /&gt;
    -- as this was the previous behaviour of the template.&lt;br /&gt;
    if not indent or indent &amp;lt;= 0 or math.floor(indent) ~= indent then&lt;br /&gt;
        return ret&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    -- Generate the indents. The first four cases are special.&lt;br /&gt;
    if indent == 1 then&lt;br /&gt;
        return ret .. &amp;#039;&amp;amp;nbsp;&amp;#039;&lt;br /&gt;
    elseif indent == 2 then&lt;br /&gt;
        return ret .. &amp;#039;&amp;amp;nbsp;&amp;amp;nbsp;&amp;#039;&lt;br /&gt;
    elseif indent == 3 then&lt;br /&gt;
        return ret .. &amp;#039;&amp;amp;nbsp;&amp;amp;emsp;&amp;amp;nbsp;&amp;#039;&lt;br /&gt;
    elseif indent == 4 then&lt;br /&gt;
        return ret .. &amp;#039;&amp;amp;nbsp; &amp;amp;emsp; &amp;amp;nbsp;&amp;#039;&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    -- Set variables for generating the output after indent == 5.&lt;br /&gt;
    local r = {}&lt;br /&gt;
    r.base = &amp;#039;&amp;amp;nbsp;&amp;#039; -- Common text to all output.&lt;br /&gt;
    r.rep = &amp;#039; &amp;amp;emsp; &amp;amp;nbsp;&amp;#039; -- The text to repeat.&lt;br /&gt;
    r.mod1 = &amp;#039;&amp;amp;nbsp;&amp;#039; -- To return on modulo 1.&lt;br /&gt;
    r.mod2 = &amp;#039; &amp;amp;emsp;&amp;#039; -- To return on modulo 2.&lt;br /&gt;
    r.mod3 = &amp;#039; &amp;amp;emsp;&amp;amp;nbsp;&amp;#039; -- To return on modulo 3.&lt;br /&gt;
    &lt;br /&gt;
    -- New iteratorText values needed at 5, 9, 13, 17, etc., so repeat the&lt;br /&gt;
    -- text (indent - 1)/4 times and find the remainder.&lt;br /&gt;
    local reps = math.floor( (indent - 1) / 4 )&lt;br /&gt;
    local remainder = math.fmod( indent - 1, 4 )&lt;br /&gt;
    &lt;br /&gt;
    -- Generate the indent text.&lt;br /&gt;
    ret = ret .. r.base .. mw.ustring.rep( r.rep, reps )&lt;br /&gt;
    if remainder &amp;gt;= 1 and remainder &amp;lt;= 3 then&lt;br /&gt;
        ret = ret .. r[ &amp;#039;mod&amp;#039; .. remainder ]&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    return ret&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;MusikBot II</name></author>
	</entry>
</feed>