<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh">
	<id>https://arolstar52-zhtest.hf.space/index.php?action=history&amp;feed=atom&amp;title=Module%3ASpecial_wikitext%2FTemplate</id>
	<title>Module:Special wikitext/Template - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://arolstar52-zhtest.hf.space/index.php?action=history&amp;feed=atom&amp;title=Module%3ASpecial_wikitext%2FTemplate"/>
	<link rel="alternate" type="text/html" href="https://arolstar52-zhtest.hf.space/index.php?title=Module:Special_wikitext/Template&amp;action=history"/>
	<updated>2026-07-03T05:53:39Z</updated>
	<subtitle>在这个wiki上该页的修订历史</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://arolstar52-zhtest.hf.space/index.php?title=Module:Special_wikitext/Template&amp;diff=3673599&amp;oldid=prev</id>
		<title>imported&gt;Xiplus：​已保护“Module:Special wikitext/Template”：高風險模板，被小工具MediaWiki:Gadget-SpecialWikitext.js使用（[编辑=仅允许管理员]（无限期）[移动=仅允许管理员]（无限期））</title>
		<link rel="alternate" type="text/html" href="https://arolstar52-zhtest.hf.space/index.php?title=Module:Special_wikitext/Template&amp;diff=3673599&amp;oldid=prev"/>
		<updated>2021-05-26T05:41:37Z</updated>

		<summary type="html">&lt;p&gt;已保护“&lt;a href=&quot;/wiki/Module:Special_wikitext/Template&quot; title=&quot;Module:Special wikitext/Template&quot;&gt;Module:Special wikitext/Template&lt;/a&gt;”：高風險模板，被小工具&lt;a href=&quot;/wiki/MediaWiki:Gadget-SpecialWikitext.js&quot; title=&quot;MediaWiki:Gadget-SpecialWikitext.js&quot;&gt;MediaWiki:Gadget-SpecialWikitext.js&lt;/a&gt;使用（[编辑=仅允许管理员]（无限期）[移动=仅允许管理员]（无限期））&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;local p={}&lt;br /&gt;
--{{#invoke:Special wikitext/Template|contentModel}}&lt;br /&gt;
function p.contentModel(frame)&lt;br /&gt;
	local page_name = frame.args[1] or frame.args[&amp;#039;1&amp;#039;] or &amp;#039;&amp;#039;&lt;br /&gt;
	local default_namespace = mw.text.trim(frame.args[2] or frame.args[&amp;#039;2&amp;#039;] or &amp;#039;&amp;#039;)&lt;br /&gt;
	local page_data = (mw.text.trim(page_name)==&amp;#039;&amp;#039;and mw.title.getCurrentTitle() or mw.title.new(page_name,default_namespace))&lt;br /&gt;
	return (page_data or {}).contentModel or &amp;#039;wikitext&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
--{{#invoke:Special wikitext/Template|luaContentFromPage}}&lt;br /&gt;
function p.luaContentFromPage(frame)&lt;br /&gt;
	local page_name = frame.args[1] or frame.args[&amp;#039;1&amp;#039;] or &amp;#039;&amp;#039;&lt;br /&gt;
	local default_namespace = mw.text.trim(frame.args[2] or frame.args[&amp;#039;2&amp;#039;] or &amp;#039;&amp;#039;)&lt;br /&gt;
	local page_data = (mw.text.trim(page_name)==&amp;#039;&amp;#039;and mw.title.getCurrentTitle() or mw.title.new(page_name, default_namespace))&lt;br /&gt;
	local contentModel = mw.ustring.lower((page_data or {}).contentModel or &amp;#039;wikitext&amp;#039;)&lt;br /&gt;
	if contentModel == &amp;#039;scribunto&amp;#039; or contentModel == &amp;#039;lua&amp;#039; then&lt;br /&gt;
		pcall(require, page_data.prefixedText) -- if it fails, we don&amp;#039;t care&lt;br /&gt;
		local moduleWikitext = package.loaded[&amp;quot;Module:Module wikitext&amp;quot;]&lt;br /&gt;
		if moduleWikitext then&lt;br /&gt;
			return moduleWikitext.main()&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	return &amp;#039;&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--{{#invoke:Special wikitext/Template|markinclude}}&lt;br /&gt;
function p.markinclude(frame)&lt;br /&gt;
	local page_name = frame.args[1] or frame.args[&amp;#039;1&amp;#039;] or &amp;#039;&amp;#039;&lt;br /&gt;
	local detail = mw.text.trim(frame.args[2] or frame.args[&amp;#039;2&amp;#039;] or &amp;#039;&amp;#039;)&lt;br /&gt;
	local page_data = (mw.text.trim(page_name)==&amp;#039;&amp;#039;and mw.title.getCurrentTitle() or mw.title.new(page_name))&lt;br /&gt;
	if page_data:getContent() then -- recorded as a transclusion, and check exist.&lt;br /&gt;
		return &amp;#039;*[[:&amp;#039;..page_name..&amp;#039;]]&amp;#039; .. (detail ~= &amp;#039;&amp;#039; and (&amp;#039;（&amp;#039;..detail..&amp;#039;）&amp;#039;) or &amp;#039;&amp;#039;)&lt;br /&gt;
	elseif mw.text.trim(page_name) ~= &amp;#039;&amp;#039; then&lt;br /&gt;
		return &amp;#039;*&amp;#039;..page_name.. (detail ~= &amp;#039;&amp;#039; and (&amp;#039;（&amp;#039;..detail..&amp;#039;）&amp;#039;) or &amp;#039;&amp;#039;)&lt;br /&gt;
	end&lt;br /&gt;
	return &amp;#039;&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
--{{#invoke:Special wikitext/Template|checkPage}}&lt;br /&gt;
function p.checkPage(frame)&lt;br /&gt;
	local chk_name = frame.args[1] or frame.args[&amp;#039;1&amp;#039;] or &amp;#039;&amp;#039;&lt;br /&gt;
	local cur_name = frame.args[2] or frame.args[&amp;#039;2&amp;#039;] or &amp;#039;&amp;#039;&lt;br /&gt;
	local default_namespace = mw.text.trim(frame.args[3] or frame.args[&amp;#039;3&amp;#039;] or &amp;#039;&amp;#039;)&lt;br /&gt;
	if mw.text.trim(chk_name or &amp;#039;&amp;#039;)==&amp;#039;&amp;#039;then return &amp;#039;&amp;#039; end&lt;br /&gt;
	return p._checkPage(chk_name, cur_name, default_namespace) and &amp;#039;1&amp;#039; or &amp;#039;&amp;#039;&lt;br /&gt;
end&lt;br /&gt;
function p._checkPage(page, srcpage, default_namespace)&lt;br /&gt;
	local chk_page, cur_page = mw.title.new(page, default_namespace), (mw.text.trim(srcpage or &amp;#039;&amp;#039;)==&amp;#039;&amp;#039; and mw.title.getCurrentTitle() or mw.title.new(srcpage, default_namespace))&lt;br /&gt;
	local chk_name, cur_name = &amp;#039;##:&amp;#039;..chk_page.fullText, &amp;#039;##:&amp;#039;..cur_page.fullText&lt;br /&gt;
	local chk_reg = mw.ustring.gsub(chk_name,&amp;#039;([%%\\])&amp;#039;,&amp;#039;%1%1&amp;#039;)&lt;br /&gt;
	local chk_regs, cur_names = chk_reg..(mw.ustring.sub(chk_reg,-1,-1)==&amp;#039;/&amp;#039;and&amp;#039;&amp;#039;or&amp;#039;/&amp;#039;), cur_name..(mw.ustring.sub(cur_name,-1,-1)==&amp;#039;/&amp;#039;and&amp;#039;&amp;#039;or&amp;#039;/&amp;#039;)&lt;br /&gt;
	local findpos = mw.ustring.find(cur_name, chk_reg)&lt;br /&gt;
	if (tonumber(findpos) or -1) &amp;gt; 0 then findpos = mw.ustring.find(cur_names, chk_regs)end&lt;br /&gt;
	return (tonumber(findpos) or -1) &amp;gt; 0&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.int(frame)&lt;br /&gt;
	local int_name = frame.args[1] or frame.args[&amp;#039;1&amp;#039;] or &amp;#039;&amp;#039; &lt;br /&gt;
	local cur_frame = mw.getCurrentFrame()&lt;br /&gt;
	local body = mw.text.decode(cur_frame:preprocess(&amp;quot;{{msgnw:int:&amp;quot;..int_name..&amp;quot;}}&amp;quot;))&lt;br /&gt;
	body = mw.ustring.gsub(body,&amp;#039;#%s*invoke%s*:%s*Special%s+wikitext%|&amp;#039;,&amp;#039;void|&amp;#039;)&lt;br /&gt;
	return cur_frame:preprocess(body)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p.getNotices(frame)&lt;br /&gt;
	local page_name = frame.args[1] or frame.args[&amp;#039;1&amp;#039;] or &amp;#039;&amp;#039; &lt;br /&gt;
	local cur_frame = mw.getCurrentFrame()&lt;br /&gt;
	local page_subname = frame.args[2] or frame.args[&amp;#039;2&amp;#039;] or &amp;#039;&amp;#039; &lt;br /&gt;
	local title = mw.title.new(&amp;#039;Template:Editnotices/Page/&amp;#039; .. page_name)&lt;br /&gt;
	local subtitle = mw.title.new(&amp;#039;Template:Editnotices/Page/&amp;#039; .. page_name .. page_subname)&lt;br /&gt;
	if subtitle.exists then return frame:expandTemplate{ title = subtitle.text }&lt;br /&gt;
	elseif title.exists then return frame:expandTemplate{ title = title.text }&lt;br /&gt;
	else return &amp;#039;&amp;#039; end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>imported&gt;Xiplus</name></author>
	</entry>
</feed>