<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki-test.zugseil.com/en/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://wiki-test.zugseil.com/en/index.php?action=history&amp;feed=atom&amp;title=Module%3ATmpl"/>
	<link rel="alternate" type="text/html" href="https://wiki-test.zugseil.com/en/index.php?title=Module:Tmpl&amp;action=history"/>
	<updated>2026-04-17T11:24:50Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.37.1</generator>
	<entry>
		<id>https://wiki-test.zugseil.com/en/index.php?title=Module:Tmpl&amp;diff=1239&amp;oldid=prev</id>
		<title>Stefanseiler: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://wiki-test.zugseil.com/en/index.php?title=Module:Tmpl&amp;diff=1239&amp;oldid=prev"/>
		<updated>2022-06-30T20:46:27Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 20:46, 30 June 2022&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Stefanseiler</name></author>
	</entry>
	<entry>
		<id>https://wiki-test.zugseil.com/en/index.php?title=Module:Tmpl&amp;diff=1238&amp;oldid=prev</id>
		<title>www.mediawiki.org&gt;ExE Boss: Prevent exponential expansion by performing all replacements during a single pass; goes from O(2ⁿ) to O(n)</title>
		<link rel="alternate" type="text/html" href="https://wiki-test.zugseil.com/en/index.php?title=Module:Tmpl&amp;diff=1238&amp;oldid=prev"/>
		<updated>2021-08-18T13:48:19Z</updated>

		<summary type="html">&lt;p&gt;Prevent exponential expansion by performing all replacements during a single pass; &lt;a href=&quot;/en/index.php?title=W:Big_O_notation&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;W:Big O notation (page does not exist)&quot;&gt;goes from O(2ⁿ) to O(n)&lt;/a&gt;&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('Module:No globals')&lt;br /&gt;
&lt;br /&gt;
-- The trailing `[^0-9]?` ensures that `$10` doesn'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 ''&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, '$' .. 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>www.mediawiki.org&gt;ExE Boss</name></author>
	</entry>
</feed>