<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.therofl98.co/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AIncrementParams</id>
	<title>Module:IncrementParams - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.therofl98.co/w/index.php?action=history&amp;feed=atom&amp;title=Module%3AIncrementParams"/>
	<link rel="alternate" type="text/html" href="https://wiki.therofl98.co/w/index.php?title=Module:IncrementParams&amp;action=history"/>
	<updated>2026-06-04T00:46:50Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://wiki.therofl98.co/w/index.php?title=Module:IncrementParams&amp;diff=5989&amp;oldid=prev</id>
		<title>FairPlay137: Created page with &quot;-- STEP 1: Click on the &quot;edit&quot; tab at the top of the page to edit this module.  -- STEP 2: if you want to increment by a number other than 1, put that number below, after the...&quot;</title>
		<link rel="alternate" type="text/html" href="https://wiki.therofl98.co/w/index.php?title=Module:IncrementParams&amp;diff=5989&amp;oldid=prev"/>
		<updated>2019-06-07T18:42:25Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;-- STEP 1: Click on the &amp;quot;edit&amp;quot; tab at the top of the page to edit this module.  -- STEP 2: if you want to increment by a number other than 1, put that number below, after the...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;-- STEP 1: Click on the &amp;quot;edit&amp;quot; tab at the top of the page to edit this module.&lt;br /&gt;
&lt;br /&gt;
-- STEP 2: if you want to increment by a number other than 1, put that number below, after the equals sign. &lt;br /&gt;
local increment = 1&lt;br /&gt;
&lt;br /&gt;
-- STEP 3: Replace the example template text with the template text that you wish to increment.&lt;br /&gt;
local templatetext = [==========[&lt;br /&gt;
|header3  = Section 1&lt;br /&gt;
|label5   = Label A&lt;br /&gt;
|data5    = Data A&lt;br /&gt;
|label7   = Label C&lt;br /&gt;
|data7    = Data C&lt;br /&gt;
|header10 = Section 2&lt;br /&gt;
|label12  = Label D&lt;br /&gt;
|data12   = Data D&lt;br /&gt;
]==========]&lt;br /&gt;
&lt;br /&gt;
-- STEP 4: Save this module.&lt;br /&gt;
&lt;br /&gt;
-- STEP 5: You can now output the incremented text with the following code:&lt;br /&gt;
--                {{subst:#invoke:IncrementParams|main}}&lt;br /&gt;
-- Or you can simply copy and paste the text from this module&amp;#039;s documentation.&lt;br /&gt;
&lt;br /&gt;
-- STEP 6: Check the output! In rare cases this module might produce false positives.&lt;br /&gt;
-- For example, it will change the text &amp;quot;[[Some link|foo3=bar]]&amp;quot; to &amp;quot;[[Some link|foo4=bar]]&amp;quot;.&lt;br /&gt;
-- You can use the &amp;quot;show changes&amp;quot; function in the edit window of the template you are editing&lt;br /&gt;
-- to find any false positives.&lt;br /&gt;
&lt;br /&gt;
-- STEP 7: When you are finished, undo your changes to this page, so that the next person&lt;br /&gt;
-- won&amp;#039;t be confused by seeing any non-default values. Thanks for using this module!&lt;br /&gt;
&lt;br /&gt;
local p = {}&lt;br /&gt;
 &lt;br /&gt;
local function replace(prefix, num, suffix)&lt;br /&gt;
    return &amp;#039;|&amp;#039; .. prefix .. tostring(tonumber(num) + increment) .. suffix .. &amp;#039;=&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
function p.main(frame)&lt;br /&gt;
    -- Increment the template text.&lt;br /&gt;
    templatetext = mw.ustring.gsub(templatetext, &amp;#039;|(%s*%a?[%a_%-]-%s*)([1-9]%d*)(%s*[%a_%-]-%a?%s*)=&amp;#039;, replace)&lt;br /&gt;
    -- Add pre tags and escape html etc. if the pre option is set.&lt;br /&gt;
    if frame and frame.args and frame.args.pre and frame.args.pre ~= &amp;#039;&amp;#039; then&lt;br /&gt;
        templatetext = mw.text.nowiki(templatetext)&lt;br /&gt;
        templatetext = &amp;#039;&amp;lt;pre style=&amp;quot;white-space:-moz-pre-wrap; white-space:-pre-wrap; &amp;#039;&lt;br /&gt;
            .. &amp;#039;white-space:-o-pre-wrap; white-space:pre-wrap; word-wrap:break-word;&amp;quot;&amp;gt;&amp;#039; &lt;br /&gt;
            .. templatetext .. &amp;#039;&amp;lt;/pre&amp;gt;&amp;#039;&lt;br /&gt;
    end&lt;br /&gt;
    return templatetext&lt;br /&gt;
end&lt;br /&gt;
 &lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>FairPlay137</name></author>
	</entry>
</feed>