<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>https://wiki.statsape.com/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E5%9D%97%3ADemoTemplate</id>
	<title>模块:DemoTemplate - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.statsape.com/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E5%9D%97%3ADemoTemplate"/>
	<link rel="alternate" type="text/html" href="https://wiki.statsape.com/index.php?title=%E6%A8%A1%E5%9D%97:DemoTemplate&amp;action=history"/>
	<updated>2026-05-14T21:17:26Z</updated>
	<subtitle>本wiki上该页面的版本历史</subtitle>
	<generator>MediaWiki 1.39.6</generator>
	<entry>
		<id>https://wiki.statsape.com/index.php?title=%E6%A8%A1%E5%9D%97:DemoTemplate&amp;diff=8048&amp;oldid=prev</id>
		<title>Zeroclanzhang：​创建页面，内容为“require(&#039;strict&#039;)  local newBuffer = require(&#039;Module:OutputBuffer&#039;) local mt = {}  function mt.__index(t, title) 	return function(frame) 		local getBuffer, print, printf = newBuffer() 		printf(&#039;{{%s&#039;, title) 		local ipairsArgs = {} 		for k,v in ipairs(frame.args) do 			if string.find(v, &#039;=&#039;, 1, true) then 				break 			end 			ipairsArgs[k] = true 			printf(&#039;|%s&#039;, v) 		end 		for k,v in pairs(frame.args) do 			if not ipairsArgs[k] then 				printf(&#039;|%s=%s&#039;, string.…”</title>
		<link rel="alternate" type="text/html" href="https://wiki.statsape.com/index.php?title=%E6%A8%A1%E5%9D%97:DemoTemplate&amp;diff=8048&amp;oldid=prev"/>
		<updated>2024-01-21T14:56:48Z</updated>

		<summary type="html">&lt;p&gt;创建页面，内容为“require(&amp;#039;strict&amp;#039;)  local newBuffer = require(&amp;#039;Module:OutputBuffer&amp;#039;) local mt = {}  function mt.__index(t, title) 	return function(frame) 		local getBuffer, print, printf = newBuffer() 		printf(&amp;#039;{{%s&amp;#039;, title) 		local ipairsArgs = {} 		for k,v in ipairs(frame.args) do 			if string.find(v, &amp;#039;=&amp;#039;, 1, true) then 				break 			end 			ipairsArgs[k] = true 			printf(&amp;#039;|%s&amp;#039;, v) 		end 		for k,v in pairs(frame.args) do 			if not ipairsArgs[k] then 				printf(&amp;#039;|%s=%s&amp;#039;, string.…”&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;require(&amp;#039;strict&amp;#039;)&lt;br /&gt;
&lt;br /&gt;
local newBuffer = require(&amp;#039;Module:OutputBuffer&amp;#039;)&lt;br /&gt;
local mt = {}&lt;br /&gt;
&lt;br /&gt;
function mt.__index(t, title)&lt;br /&gt;
	return function(frame)&lt;br /&gt;
		local getBuffer, print, printf = newBuffer()&lt;br /&gt;
		printf(&amp;#039;{{%s&amp;#039;, title)&lt;br /&gt;
		local ipairsArgs = {}&lt;br /&gt;
		for k,v in ipairs(frame.args) do&lt;br /&gt;
			if string.find(v, &amp;#039;=&amp;#039;, 1, true) then&lt;br /&gt;
				break&lt;br /&gt;
			end&lt;br /&gt;
			ipairsArgs[k] = true&lt;br /&gt;
			printf(&amp;#039;|%s&amp;#039;, v)&lt;br /&gt;
		end&lt;br /&gt;
		for k,v in pairs(frame.args) do&lt;br /&gt;
			if not ipairsArgs[k] then&lt;br /&gt;
				printf(&amp;#039;|%s=%s&amp;#039;, string.gsub(k, &amp;#039;=&amp;#039;, &amp;#039;{{=}}&amp;#039;), v)&lt;br /&gt;
			end&lt;br /&gt;
		end&lt;br /&gt;
		print(&amp;#039;}}&amp;#039;)&lt;br /&gt;
		local buffer = getBuffer()&lt;br /&gt;
		-- rather than calling expandTemplate with the title and args we have, call preprocess, so that our code example will always match our output, even in the cases of pipes or other things we should have escaped but didn&amp;#039;t&lt;br /&gt;
		return string.format(&amp;#039;&amp;lt;code&amp;gt;%s&amp;lt;/code&amp;gt; &amp;amp;rarr; %s&amp;#039;, mw.text.nowiki(buffer), frame:preprocess(buffer))&lt;br /&gt;
	end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return setmetatable({}, mt)&lt;/div&gt;</summary>
		<author><name>Zeroclanzhang</name></author>
	</entry>
</feed>