<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="pl">
	<id>https://sunnyray.catk.it/w/index.php?action=history&amp;feed=atom&amp;title=Modu%C5%82%3AMultiReplace</id>
	<title>Moduł:MultiReplace - Historia wersji</title>
	<link rel="self" type="application/atom+xml" href="https://sunnyray.catk.it/w/index.php?action=history&amp;feed=atom&amp;title=Modu%C5%82%3AMultiReplace"/>
	<link rel="alternate" type="text/html" href="https://sunnyray.catk.it/w/index.php?title=Modu%C5%82:MultiReplace&amp;action=history"/>
	<updated>2026-04-12T21:58:30Z</updated>
	<subtitle>Historia wersji tej strony wiki</subtitle>
	<generator>MediaWiki 1.34.1</generator>
	<entry>
		<id>https://sunnyray.catk.it/w/index.php?title=Modu%C5%82:MultiReplace&amp;diff=586&amp;oldid=prev</id>
		<title>Catkitty: 1 wersja</title>
		<link rel="alternate" type="text/html" href="https://sunnyray.catk.it/w/index.php?title=Modu%C5%82:MultiReplace&amp;diff=586&amp;oldid=prev"/>
		<updated>2020-09-07T12:03:59Z</updated>

		<summary type="html">&lt;p&gt;1 wersja&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;pl&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← poprzednia wersja&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Wersja z 12:03, 7 wrz 2020&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;pl&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(Brak różnic)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Catkitty</name></author>
		
	</entry>
	<entry>
		<id>https://sunnyray.catk.it/w/index.php?title=Modu%C5%82:MultiReplace&amp;diff=585&amp;oldid=prev</id>
		<title>wikipedia&gt;MusikAnimal: Changed protection level for &quot;Module:MultiReplace&quot;: High-risk Lua module ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))</title>
		<link rel="alternate" type="text/html" href="https://sunnyray.catk.it/w/index.php?title=Modu%C5%82:MultiReplace&amp;diff=585&amp;oldid=prev"/>
		<updated>2019-02-25T03:38:04Z</updated>

		<summary type="html">&lt;p&gt;Changed protection level for &amp;quot;&lt;a href=&quot;/wiki/Modu%C5%82:MultiReplace&quot; title=&quot;Moduł:MultiReplace&quot;&gt;Module:MultiReplace&lt;/a&gt;&amp;quot;: &lt;a href=&quot;/w/index.php?title=WP:High-risk_templates&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;WP:High-risk templates (strona nie istnieje)&quot;&gt;High-risk Lua module&lt;/a&gt; ([Edit=Require template editor access] (indefinite) [Move=Require template editor access] (indefinite))&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Nowa strona&lt;/b&gt;&lt;/p&gt;&lt;div&gt;p = {}&lt;br /&gt;
&lt;br /&gt;
local function MultiReplace(args)&lt;br /&gt;
	local input = args[1] or &amp;quot;{{{1}}}&amp;quot;&lt;br /&gt;
	local plain = args.plain == &amp;quot;yes&amp;quot;&lt;br /&gt;
&lt;br /&gt;
	local i = 1&lt;br /&gt;
	local changeList = {}&lt;br /&gt;
	while args[i * 2] do&lt;br /&gt;
		local change = {pattern = args[i * 2], repl = args[i * 2 + 1]}&lt;br /&gt;
		if not change.repl then&lt;br /&gt;
			return require('Module:Error').error{&lt;br /&gt;
				'MultiReplace: Unpaired argument: &amp;lt;code&amp;gt;' .. (i * 2) .. ' = ' .. change.pattern .. '&amp;lt;/code&amp;gt;'&lt;br /&gt;
			}&lt;br /&gt;
		end&lt;br /&gt;
		changeList[i] = change&lt;br /&gt;
		i = i + 1&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	local matchList = {}&lt;br /&gt;
	local pos = 1&lt;br /&gt;
	local len = mw.ustring.len(input)&lt;br /&gt;
	local result = &amp;quot;&amp;quot;&lt;br /&gt;
	while pos &amp;lt;= len do&lt;br /&gt;
		local bestStart = len + 1&lt;br /&gt;
		local bestStop = len&lt;br /&gt;
		local bestChange&lt;br /&gt;
		for _, change in ipairs(changeList) do&lt;br /&gt;
			local start, stop = mw.ustring.find(input, change.pattern, pos, plain)&lt;br /&gt;
			if start and (start &amp;lt; bestStart) then&lt;br /&gt;
				bestStart = start&lt;br /&gt;
				bestStop = stop&lt;br /&gt;
				bestChange = change&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		result = result .. mw.ustring.sub(input, pos, bestStart - 1)&lt;br /&gt;
		if bestChange then&lt;br /&gt;
			local fragment = mw.ustring.sub(input, bestStart, bestStop)&lt;br /&gt;
			result = result .. (plain and bestChange.repl or&lt;br /&gt;
				mw.ustring.gsub(fragment, bestChange.pattern, bestChange.repl, 1))&lt;br /&gt;
		end&lt;br /&gt;
		pos = bestStop + 1&lt;br /&gt;
	end&lt;br /&gt;
	return result&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame, ...)&lt;br /&gt;
	local args =&lt;br /&gt;
		type(frame) ~= 'table' and {frame, ...} or&lt;br /&gt;
		type(frame.args) ~= 'table' and frame or&lt;br /&gt;
		frame.args[1] and frame.args or&lt;br /&gt;
		frame:getParent().args&lt;br /&gt;
	return MultiReplace(args)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>wikipedia&gt;MusikAnimal</name></author>
		
	</entry>
</feed>