<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://catalog.jinharsh.co.in/index.php?action=history&amp;feed=atom&amp;title=Module%3ATemplate_parameter_value</id>
	<title>Module:Template parameter value - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://catalog.jinharsh.co.in/index.php?action=history&amp;feed=atom&amp;title=Module%3ATemplate_parameter_value"/>
	<link rel="alternate" type="text/html" href="https://catalog.jinharsh.co.in/index.php?title=Module:Template_parameter_value&amp;action=history"/>
	<updated>2026-05-02T22:26:48Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.35.1</generator>
	<entry>
		<id>https://catalog.jinharsh.co.in/index.php?title=Module:Template_parameter_value&amp;diff=5122&amp;oldid=prev</id>
		<title>Admin: 1 revision imported: Mitul Imported from Wikipedia</title>
		<link rel="alternate" type="text/html" href="https://catalog.jinharsh.co.in/index.php?title=Module:Template_parameter_value&amp;diff=5122&amp;oldid=prev"/>
		<updated>2021-04-11T19:43:04Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported: Mitul Imported from Wikipedia&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left diff-editfont-monospace&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 19:43, 11 April 2021&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>Admin</name></author>
	</entry>
	<entry>
		<id>https://catalog.jinharsh.co.in/index.php?title=Module:Template_parameter_value&amp;diff=5121&amp;oldid=prev</id>
		<title>setup&gt;Alex 21: Undid revision 979851790 by Alex 21 (talk)</title>
		<link rel="alternate" type="text/html" href="https://catalog.jinharsh.co.in/index.php?title=Module:Template_parameter_value&amp;diff=5121&amp;oldid=prev"/>
		<updated>2020-09-23T04:28:53Z</updated>

		<summary type="html">&lt;p&gt;Undid revision 979851790 by &lt;a href=&quot;/index.php?title=Special:Contributions/Alex_21&quot; title=&quot;Special:Contributions/Alex 21&quot;&gt;Alex 21&lt;/a&gt; (&lt;a href=&quot;/index.php?title=User_talk:Alex_21&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;User talk:Alex 21 (page does not exist)&quot;&gt;talk&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p = {}&lt;br /&gt;
local escape = require(&amp;quot;Module:String&amp;quot;)._escapePattern&lt;br /&gt;
function trimspaces(s)&lt;br /&gt;
	return string.gsub(s, &amp;quot;^%s*(.-)%s*$&amp;quot;, &amp;quot;%1&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local function getTitle(title)&lt;br /&gt;
	local success, titleObj = pcall(mw.title.new, title)&lt;br /&gt;
	if success then return titleObj&lt;br /&gt;
	else return nil end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	local args = require('Module:Arguments').getArgs(frame, {&lt;br /&gt;
		wrappers = 'Template:Template parameter value'&lt;br /&gt;
	})&lt;br /&gt;
	local template = escape(args[2])&lt;br /&gt;
	local parameter = escape(args[4])&lt;br /&gt;
	local numberedParameter = (tonumber(parameter) ~= nil)&lt;br /&gt;
	&lt;br /&gt;
	local templateCount = 0&lt;br /&gt;
	local parameterCount = 0&lt;br /&gt;
	local templateMatch = tonumber(args[3] or 1)&lt;br /&gt;
	local parameterMatch = tonumber(args[5] or 1)*(numberedParameter and parameter or 1)&lt;br /&gt;
	&lt;br /&gt;
	local targettitle = getTitle(args[1])&lt;br /&gt;
	if targettitle == nil then return &amp;quot;&amp;quot; end&lt;br /&gt;
    local content = string.gsub(targettitle:getContent() or &amp;quot;&amp;quot;, &amp;quot;[\r\n]&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
	&lt;br /&gt;
	while templateCount ~= templateMatch do&lt;br /&gt;
		if content == nil then return &amp;quot;&amp;quot; end&lt;br /&gt;
		content = string.match(content, '{{' .. template .. &amp;quot;(.+)&amp;quot;)&lt;br /&gt;
		templateCount = templateCount + 1&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	while parameterCount ~= parameterMatch do&lt;br /&gt;
		if content == nil then return &amp;quot;&amp;quot; end&lt;br /&gt;
		content = string.match(content, '|%s*' .. (numberedParameter and &amp;quot;&amp;quot; or parameter .. '%s*=%s*') .. '([^|].*)')&lt;br /&gt;
		parameterCount = parameterCount + 1&lt;br /&gt;
	end&lt;br /&gt;
	&lt;br /&gt;
	if content == nil then return &amp;quot;&amp;quot; end&lt;br /&gt;
	&lt;br /&gt;
	content = string.gsub(content, &amp;quot;&amp;lt;/?%a*include%a*&amp;gt;&amp;quot;, &amp;quot;&amp;quot;)&lt;br /&gt;
	content = string.match(content, '^([^|}]*{{[^}]+}}[^|}]*)|') or string.match(content, '([^|}]+)')&lt;br /&gt;
	content = frame:preprocess{text = content}&lt;br /&gt;
	content = trimspaces(content)&lt;br /&gt;
	&lt;br /&gt;
	return content&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>setup&gt;Alex 21</name></author>
	</entry>
</feed>