<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>https://wiki.dzmuh.com/index.php?action=history&amp;feed=atom&amp;title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C%3AParamValue2Value</id>
	<title>Модуль:ParamValue2Value - История изменений</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.dzmuh.com/index.php?action=history&amp;feed=atom&amp;title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C%3AParamValue2Value"/>
	<link rel="alternate" type="text/html" href="https://wiki.dzmuh.com/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:ParamValue2Value&amp;action=history"/>
	<updated>2026-06-19T18:50:26Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.38.4</generator>
	<entry>
		<id>https://wiki.dzmuh.com/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:ParamValue2Value&amp;diff=70&amp;oldid=prev</id>
		<title>Dzmuh: Новая страница: «local p = {}  --[=[ Helper function that escapes all pattern characters so that they will be treated as plain text. Copied from :en:Module:String. ]=] local f...»</title>
		<link rel="alternate" type="text/html" href="https://wiki.dzmuh.com/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:ParamValue2Value&amp;diff=70&amp;oldid=prev"/>
		<updated>2021-04-23T23:49:03Z</updated>

		<summary type="html">&lt;p&gt;Новая страница: «local p = {}  --[=[ Helper function that escapes all pattern characters so that they will be treated as plain text. Copied from &lt;a href=&quot;https://en.wikipedia.org/wiki/Module:String&quot; class=&quot;extiw&quot; title=&quot;en:Module:String&quot;&gt;en:Module:String&lt;/a&gt;. ]=] local f...»&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
&lt;br /&gt;
--[=[&lt;br /&gt;
Helper function that escapes all pattern characters so that they will be treated&lt;br /&gt;
as plain text. Copied from [[:en:Module:String]].&lt;br /&gt;
]=]&lt;br /&gt;
local function escapePattern(pattern_str)&lt;br /&gt;
	return mw.ustring.gsub(pattern_str, '([%(%)%.%%%+%-%*%?%[%^%$%]])', '%%%1')&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
-- вызов шаблона, при ошибке возвращает пустую строку&lt;br /&gt;
local function expand(frame, tname, targs)&lt;br /&gt;
	local success, result = pcall(&lt;br /&gt;
		frame.expandTemplate,&lt;br /&gt;
		frame,&lt;br /&gt;
		{title = tname, args = targs}&lt;br /&gt;
	)&lt;br /&gt;
	if success then&lt;br /&gt;
		return result&lt;br /&gt;
	else&lt;br /&gt;
		return ''&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function is_exception(arg, exceptions)&lt;br /&gt;
	return mw.ustring.find(exceptions, '/' .. escapePattern(arg) .. '/')&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	if not getArgs then&lt;br /&gt;
		getArgs = require('Module:Arguments').getArgs&lt;br /&gt;
	end&lt;br /&gt;
	local args = getArgs(frame, {&lt;br /&gt;
		trim = false,&lt;br /&gt;
		removeBlanks = false&lt;br /&gt;
	})&lt;br /&gt;
	local tname = args._pass_to&lt;br /&gt;
	local exceptions = args._exceptions and '/' .. args._exceptions .. '/' or ''&lt;br /&gt;
	local targs, i = {}, 1&lt;br /&gt;
	for k, v in pairs(args) do&lt;br /&gt;
		if type(k) == 'number' then --неименованные параметры&lt;br /&gt;
			targs[i] = v&lt;br /&gt;
			i = i+1&lt;br /&gt;
		elseif not k:find('^_') and not is_exception(k, exceptions) then --именованные параметры, исключая настройки вызывающего шаблона&lt;br /&gt;
			targs[i] = k .. &amp;quot;=&amp;quot; .. v&lt;br /&gt;
			i = i+1&lt;br /&gt;
		elseif k ~= '_pass_to' and k ~= '_exceptions' then --настройки вызывающего шаблона&lt;br /&gt;
			targs[k] = v&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	return tostring(expand(frame, tname, targs))&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>Dzmuh</name></author>
	</entry>
</feed>