<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.p1gsel.com/p1gwars/index.php?action=history&amp;feed=atom&amp;title=Module%3ATmpl</id>
	<title>Module:Tmpl - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.p1gsel.com/p1gwars/index.php?action=history&amp;feed=atom&amp;title=Module%3ATmpl"/>
	<link rel="alternate" type="text/html" href="https://www.p1gsel.com/p1gwars/index.php?title=Module:Tmpl&amp;action=history"/>
	<updated>2026-04-17T06:47:26Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://www.p1gsel.com/p1gwars/index.php?title=Module:Tmpl&amp;diff=6231&amp;oldid=prev</id>
		<title>Rosie: Created page with &quot;-- This is a helper module for {{tmpl}} require(&#039;strict&#039;)  -- The trailing `[^0-9]?` ensures that `$10` doesn&#039;t potentially change -- from being treated as `${1}0` to being treated as `${10}` -- if the number of supported parameters is ever expanded: local PATTERN = &quot;%$([1-9])[^0-9]?&quot;  local this = {}  function this.renderTmpl(frame) 	local args = frame.args 	local pargs = (frame:getParent() or {}).args 	local input = pargs[0] or &#039;&#039; 	local result = {}  	local prevPos = 1...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.p1gsel.com/p1gwars/index.php?title=Module:Tmpl&amp;diff=6231&amp;oldid=prev"/>
		<updated>2026-01-11T14:36:11Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;-- This is a helper module for {{tmpl}} require(&amp;#039;strict&amp;#039;)  -- The trailing `[^0-9]?` ensures that `$10` doesn&amp;#039;t potentially change -- from being treated as `${1}0` to being treated as `${10}` -- if the number of supported parameters is ever expanded: local PATTERN = &amp;quot;%$([1-9])[^0-9]?&amp;quot;  local this = {}  function this.renderTmpl(frame) 	local args = frame.args 	local pargs = (frame:getParent() or {}).args 	local input = pargs[0] or &amp;#039;&amp;#039; 	local result = {}  	local prevPos = 1...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- This is a helper module for {{tmpl}}&lt;br /&gt;
require(&amp;#039;strict&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
-- The trailing `[^0-9]?` ensures that `$10` doesn&amp;#039;t potentially change&lt;br /&gt;
-- from being treated as `${1}0` to being treated as `${10}`&lt;br /&gt;
-- if the number of supported parameters is ever expanded:&lt;br /&gt;
local PATTERN = &amp;quot;%$([1-9])[^0-9]?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
local this = {}&lt;br /&gt;
&lt;br /&gt;
function this.renderTmpl(frame)&lt;br /&gt;
	local args = frame.args&lt;br /&gt;
	local pargs = (frame:getParent() or {}).args&lt;br /&gt;
	local input = pargs[0] or &amp;#039;&amp;#039;&lt;br /&gt;
	local result = {}&lt;br /&gt;
&lt;br /&gt;
	local prevPos = 1&lt;br /&gt;
	do&lt;br /&gt;
		local startPos, _, k&lt;br /&gt;
		while true do&lt;br /&gt;
			startPos, _, k = string.find(input, PATTERN, prevPos)&lt;br /&gt;
			if (not startPos) then break end&lt;br /&gt;
			table.insert(result, string.sub(input, prevPos, startPos - 1))&lt;br /&gt;
&lt;br /&gt;
			local n = tonumber(k)&lt;br /&gt;
			local r = pargs[n]&lt;br /&gt;
			if (r) then&lt;br /&gt;
				table.insert(result, r)&lt;br /&gt;
			else&lt;br /&gt;
				table.insert(result, &amp;#039;$&amp;#039; .. n)&lt;br /&gt;
			end&lt;br /&gt;
&lt;br /&gt;
			prevPos = startPos + #k + 1&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
&lt;br /&gt;
	table.insert(result, string.sub(input, prevPos))&lt;br /&gt;
	return table.concat(result)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return this&lt;/div&gt;</summary>
		<author><name>Rosie</name></author>
	</entry>
</feed>