<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
	<id>https://station14.ru/history/%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:ParamValue2Value?feed=atom</id>
	<title>Модуль:ParamValue2Value - История изменений</title>
	<link rel="self" type="application/atom+xml" href="https://station14.ru/history/%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:ParamValue2Value?feed=atom"/>
	<link rel="alternate" type="text/html" href="https://station14.ru/history/%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:ParamValue2Value"/>
	<updated>2026-04-11T18:45:19Z</updated>
	<subtitle>История изменений этой страницы в вики</subtitle>
	<generator>MediaWiki 1.43.6</generator>
	<entry>
		<id>https://station14.ru/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:ParamValue2Value&amp;diff=76989&amp;oldid=prev</id>
		<title>Pok: Новая страница: «local p = {}  --[=[ -- source: https://ru.wikipedia.org/wiki/Модуль:ParamValue2Value -- license: CC BY-SA 4.0   Helper function that escapes all pattern characters so that they will be treated as plain text. Copied from :en:Module:String. ]=] local function escapePattern(pattern_str) 	return mw.ustring.gsub(pattern_str, &#039;([%(%)%.%%%+%-%*%?%[%^%$%]])&#039;, &#039;%%%1&#039;) end  -- вызов шаблона, при ошибке возвращает пустую...»</title>
		<link rel="alternate" type="text/html" href="https://station14.ru/index.php?title=%D0%9C%D0%BE%D0%B4%D1%83%D0%BB%D1%8C:ParamValue2Value&amp;diff=76989&amp;oldid=prev"/>
		<updated>2025-04-05T12:58:40Z</updated>

		<summary type="html">&lt;p&gt;Новая страница: «local p = {}  --[=[ -- source: https://ru.wikipedia.org/wiki/Модуль:ParamValue2Value -- license: CC BY-SA 4.0   Helper function that escapes all pattern characters so that they will be treated as plain text. Copied from &lt;a href=&quot;/edit/En:Module:String?redlink=1&quot; class=&quot;new&quot; title=&quot;En:Module:String (страница не существует)&quot;&gt;en:Module:String&lt;/a&gt;. ]=] local function escapePattern(pattern_str) 	return mw.ustring.gsub(pattern_str, &amp;#039;([%(%)%.%%%+%-%*%?%[%^%$%]])&amp;#039;, &amp;#039;%%%1&amp;#039;) end  -- вызов шаблона, при ошибке возвращает пустую...»&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;
-- source: https://ru.wikipedia.org/wiki/Модуль:ParamValue2Value&lt;br /&gt;
-- license: CC BY-SA 4.0 &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, &amp;#039;([%(%)%.%%%+%-%*%?%[%^%$%]])&amp;#039;, &amp;#039;%%%1&amp;#039;)&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 &amp;#039;&amp;#039;&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, &amp;#039;/&amp;#039; .. escapePattern(arg) .. &amp;#039;/&amp;#039;)&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(&amp;#039;Module:Arguments&amp;#039;).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 &amp;#039;/&amp;#039; .. args._exceptions .. &amp;#039;/&amp;#039; or &amp;#039;&amp;#039;&lt;br /&gt;
	local targs, i = {}, 1&lt;br /&gt;
	for k, v in pairs(args) do&lt;br /&gt;
		if type(k) == &amp;#039;number&amp;#039; then --неименованные параметры&lt;br /&gt;
			targs[i] = v&lt;br /&gt;
			i = i+1&lt;br /&gt;
		elseif not k:find(&amp;#039;^_&amp;#039;) 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 ~= &amp;#039;_pass_to&amp;#039; and k ~= &amp;#039;_exceptions&amp;#039; 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>Pok</name></author>
	</entry>
</feed>