<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://pdkb.chivanet.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3AIn5</id>
		<title>Module:In5 - Revision history</title>
		<link rel="self" type="application/atom+xml" href="https://pdkb.chivanet.org/wiki/index.php?action=history&amp;feed=atom&amp;title=Module%3AIn5"/>
		<link rel="alternate" type="text/html" href="https://pdkb.chivanet.org/wiki/index.php?title=Module:In5&amp;action=history"/>
		<updated>2026-05-05T15:12:50Z</updated>
		<subtitle>Revision history for this page on the wiki</subtitle>
		<generator>MediaWiki 1.29.1</generator>

	<entry>
		<id>https://pdkb.chivanet.org/wiki/index.php?title=Module:In5&amp;diff=1930&amp;oldid=prev</id>
		<title>Jawitkien: Created page with &quot;-- This module implements {{in5}}.  local p = {}  function p.in5(frame)     local indent = frame.args[1]     -- Trim whitespace and convert to number. Default to 5 if not pres...&quot;</title>
		<link rel="alternate" type="text/html" href="https://pdkb.chivanet.org/wiki/index.php?title=Module:In5&amp;diff=1930&amp;oldid=prev"/>
				<updated>2021-06-23T14:52:34Z</updated>
		
		<summary type="html">&lt;p&gt;Created page with &amp;quot;-- This module implements {{in5}}.  local p = {}  function p.in5(frame)     local indent = frame.args[1]     -- Trim whitespace and convert to number. Default to 5 if not pres...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- This module implements {{in5}}.&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.in5(frame)&lt;br /&gt;
    local indent = frame.args[1]&lt;br /&gt;
    -- Trim whitespace and convert to number. Default to 5 if not present,&lt;br /&gt;
    -- as per the template title.&lt;br /&gt;
    indent = tonumber( mw.text.trim(indent) ) or 5&lt;br /&gt;
    -- Round down to nearest integer. Decimal values produce funky results&lt;br /&gt;
    -- from the original template, but there&amp;#039;s no need for us to replicate that.&lt;br /&gt;
    indent = math.floor( indent )&lt;br /&gt;
    -- Don&amp;#039;t output anything for zero or less. Again, there was some funky output&lt;br /&gt;
    -- here for negatives, but now we&amp;#039;re in Lua we should use sane defaults.&lt;br /&gt;
    if indent &amp;lt;= 0 then&lt;br /&gt;
        return&lt;br /&gt;
    end&lt;br /&gt;
    &lt;br /&gt;
    local base = &amp;#039;&amp;amp;nbsp; &amp;#039;&lt;br /&gt;
    local modulo = &amp;#039;&amp;amp;nbsp;&amp;#039;&lt;br /&gt;
 &lt;br /&gt;
--[[&lt;br /&gt;
    Indent values and the corresponding values for base and modulo:&lt;br /&gt;
&lt;br /&gt;
    indent  base    modulo&lt;br /&gt;
    1       0       1&lt;br /&gt;
    2       0       2&lt;br /&gt;
    3       1       1&lt;br /&gt;
    4       1       2&lt;br /&gt;
    5       2       1&lt;br /&gt;
    6       2       2&lt;br /&gt;
    7       3       1&lt;br /&gt;
    8       3       2&lt;br /&gt;
    9       4       1&lt;br /&gt;
    10      4       2&lt;br /&gt;
]]&lt;br /&gt;
    &lt;br /&gt;
    local baseNum = math.floor( (indent - 1) / 2 )&lt;br /&gt;
    local modNum = math.fmod( indent - 1 , 2 ) + 1&lt;br /&gt;
    &lt;br /&gt;
    return mw.ustring.rep( base, baseNum) .. mw.ustring.rep( modulo, modNum )&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Jawitkien</name></author>	</entry>

	</feed>