<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASandbox%2FWnt%2FTextMarkup</id>
	<title>Module:Sandbox/Wnt/TextMarkup - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://stockhub.co/index.php?action=history&amp;feed=atom&amp;title=Module%3ASandbox%2FWnt%2FTextMarkup"/>
	<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/Wnt/TextMarkup&amp;action=history"/>
	<updated>2026-05-24T22:48:44Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.5</generator>
	<entry>
		<id>https://stockhub.co/index.php?title=Module:Sandbox/Wnt/TextMarkup&amp;diff=146426&amp;oldid=prev</id>
		<title>imported&gt;Pppery: Pppery moved page Module:TextMarkup to Module:Sandbox/Wnt/TextMarkup without leaving a redirect: Boldly userfying unused module by inactive user who has in the past asked for their abandoned modules to be userfied </title>
		<link rel="alternate" type="text/html" href="https://stockhub.co/index.php?title=Module:Sandbox/Wnt/TextMarkup&amp;diff=146426&amp;oldid=prev"/>
		<updated>2020-09-18T15:40:27Z</updated>

		<summary type="html">&lt;p&gt;Pppery moved page &lt;a href=&quot;/index.php?title=Module:TextMarkup&amp;amp;action=edit&amp;amp;redlink=1&quot; class=&quot;new&quot; title=&quot;Module:TextMarkup (page does not exist)&quot;&gt;Module:TextMarkup&lt;/a&gt; to &lt;a href=&quot;/research/Module:Sandbox/Wnt/TextMarkup&quot; title=&quot;Module:Sandbox/Wnt/TextMarkup&quot;&gt;Module:Sandbox/Wnt/TextMarkup&lt;/a&gt; without leaving a redirect: Boldly userfying unused module by inactive user who has in the past asked for their abandoned modules to be userfied &lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt; ---- This module accepts a piece of text or the name of a page&lt;br /&gt;
 ---- It acts on angle-bracket tags in the text to simulate an extension of the html/wiki markup set&lt;br /&gt;
 ---- Vaguely per [[WP:Lua requests]], the &amp;lt;inc&amp;gt; tag is the first example, replaced with a number &lt;br /&gt;
 ---- that increases each count.  You can set or reset the count and rate at any time by &amp;lt;inc i j&amp;gt;&lt;br /&gt;
 ---- where i=the number of that tag and j is the difference to succeeding tags.&lt;br /&gt;
&lt;br /&gt;
local p={}&lt;br /&gt;
&lt;br /&gt;
function p.markup(frame)&lt;br /&gt;
   local args=frame.args&lt;br /&gt;
   local parent=frame.getParent(frame) or {}&lt;br /&gt;
   pargs=parent.args or {}&lt;br /&gt;
   local text=args.text or pargs.text&lt;br /&gt;
   local page=args.page or pargs.page&lt;br /&gt;
   if (not text and not page) then&lt;br /&gt;
       if not args[1] then return &amp;quot;&amp;quot; end&lt;br /&gt;
       if mw.ustring.match(args[1],&amp;quot;&amp;lt;inc&amp;gt;&amp;quot;) then text=args[1] else page=args[1] end&lt;br /&gt;
   end&lt;br /&gt;
   if not text then&lt;br /&gt;
       page=mw.ustring.match(page,&amp;quot;%s*(.*%S)%s*&amp;quot;) or &amp;quot;&amp;quot;&lt;br /&gt;
       if page==&amp;quot;&amp;quot; then&lt;br /&gt;
           title=mw.title.getCurrentTitle()&lt;br /&gt;
           assert(title.getContent, &amp;quot;Bug: [[Module:TextMarkup]] failed to get content of the current page&amp;quot;)&lt;br /&gt;
           page=title.fullText&lt;br /&gt;
       else title=mw.title.new(page)&lt;br /&gt;
           assert(title.getContent, &amp;quot;Error: [[Module:TextMarkup]] failed to get content of &amp;quot;..page)&lt;br /&gt;
       end -- one way or another, we have a working getContent method&lt;br /&gt;
       text=title.getContent(title)&lt;br /&gt;
   end -- (not text) -- now we have text&lt;br /&gt;
   local counter=0 -- set counter to zero before encountering an &amp;lt;inc&amp;gt; tag&lt;br /&gt;
   local increment=1 -- default increment&lt;br /&gt;
   local prowl=mw.ustring.gmatch(text,&amp;quot;&amp;lt;inc([^&amp;gt;]*)&amp;gt;&amp;quot;) -- iterator function to get all the tags&lt;br /&gt;
   local output=text -- copy to do substitutions on&lt;br /&gt;
   repeat&lt;br /&gt;
       local inccontent=prowl()&lt;br /&gt;
       if not inccontent then break end -- loop exit&lt;br /&gt;
       local n1,n2 = mw.ustring.match(text,&amp;quot;%D-(%d+)%D-(%d+)&amp;quot;)&lt;br /&gt;
       if n2 then increment=tonumber(n2) end&lt;br /&gt;
       counter=counter+increment&lt;br /&gt;
       if n1 then counter=tonumber(n1) end&lt;br /&gt;
       output=mw.ustring.gsub(output,&amp;quot;&amp;lt;inc([^&amp;gt;]*)&amp;gt;&amp;quot;,tostring(counter),1) -- change one instance according to the one instance found&lt;br /&gt;
   until false&lt;br /&gt;
   return output&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;Pppery</name></author>
	</entry>
</feed>