<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="zh-Hans-CN">
	<id>https://wiki.juanweixianshe.com/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E5%9D%97%3AMain</id>
	<title>模块:Main - 版本历史</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.juanweixianshe.com/index.php?action=history&amp;feed=atom&amp;title=%E6%A8%A1%E5%9D%97%3AMain"/>
	<link rel="alternate" type="text/html" href="https://wiki.juanweixianshe.com/index.php?title=%E6%A8%A1%E5%9D%97:Main&amp;action=history"/>
	<updated>2026-04-11T15:22:34Z</updated>
	<subtitle>本wiki的该页面的版本历史</subtitle>
	<generator>MediaWiki 1.36.1</generator>
	<entry>
		<id>https://wiki.juanweixianshe.com/index.php?title=%E6%A8%A1%E5%9D%97:Main&amp;diff=102&amp;oldid=prev</id>
		<title>黯狐：导入1个版本</title>
		<link rel="alternate" type="text/html" href="https://wiki.juanweixianshe.com/index.php?title=%E6%A8%A1%E5%9D%97:Main&amp;diff=102&amp;oldid=prev"/>
		<updated>2021-08-04T08:54:11Z</updated>

		<summary type="html">&lt;p&gt;导入1个版本&lt;/p&gt;
&lt;p&gt;&lt;b&gt;新页面&lt;/b&gt;&lt;/p&gt;&lt;div&gt;--[[&lt;br /&gt;
-- This module produces a link to a main article or articles. It implements the&lt;br /&gt;
-- template {{main}}.&lt;br /&gt;
-- &lt;br /&gt;
-- If the module is used in category or category talk space, it produces &amp;quot;The&lt;br /&gt;
-- main article for this category is xxx&amp;quot;. Otherwise, it produces&lt;br /&gt;
-- &amp;quot;Main article: xxx&amp;quot;.&lt;br /&gt;
--]]&lt;br /&gt;
&lt;br /&gt;
local mHatnote = require('Module:Hatnote')&lt;br /&gt;
local mHatlist = require('Module:Hatnote list')&lt;br /&gt;
local mArguments -- lazily initialise&lt;br /&gt;
local p = {}&lt;br /&gt;
&lt;br /&gt;
function p.main(frame)&lt;br /&gt;
	mArguments = require('Module:Arguments')&lt;br /&gt;
	local args = mArguments.getArgs(frame, {parentOnly = true})&lt;br /&gt;
	local pages = {}&lt;br /&gt;
	for k, v in pairs(args) do&lt;br /&gt;
		if type(k) == 'number' then&lt;br /&gt;
			local display = args['label ' .. k] or args['l' .. k]&lt;br /&gt;
			local page = display and&lt;br /&gt;
				string.format('%s|%s', string.gsub(v, '|.*$', ''), display) or v&lt;br /&gt;
			pages[#pages + 1] = page&lt;br /&gt;
		end&lt;br /&gt;
	end&lt;br /&gt;
	if #pages == 0 and mw.title.getCurrentTitle().namespace == 0 then&lt;br /&gt;
		-- 本地化注意&lt;br /&gt;
		return mHatnote.makeWikitextError(&lt;br /&gt;
			'没有指定条目名',&lt;br /&gt;
			'Template:Main#错误',&lt;br /&gt;
			args.category&lt;br /&gt;
		)&lt;br /&gt;
	end&lt;br /&gt;
	local options = {&lt;br /&gt;
		selfref = args.selfref&lt;br /&gt;
	}&lt;br /&gt;
	return p._main(pages, options)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function p._main(args, options)&lt;br /&gt;
	-- Get the list of pages. If no first page was specified we use the current&lt;br /&gt;
	-- page name.&lt;br /&gt;
	local currentTitle = mw.title.getCurrentTitle()&lt;br /&gt;
	if #args == 0 then args = {currentTitle.text} end&lt;br /&gt;
	local firstPage = string.gsub(args[1], '|.*$', '')&lt;br /&gt;
	-- Find the pagetype.&lt;br /&gt;
	-- 本地化注意&lt;br /&gt;
	local pageType = mHatnote.findNamespaceId(firstPage) == 0 and '条目' or '页面'&lt;br /&gt;
	-- Make the formatted link text&lt;br /&gt;
	list = mHatlist.andList(args, true)&lt;br /&gt;
	-- Build the text.&lt;br /&gt;
	local isPlural = #args &amp;gt; 1&lt;br /&gt;
	local mainForm&lt;br /&gt;
	local curNs = currentTitle.namespace&lt;br /&gt;
	-- 本地化注意&lt;br /&gt;
	if (curNs == 14) or (curNs == 15) then --category/talk namespaces&lt;br /&gt;
		mainForm = '此[[Wikipedia:頁面分類|分类]]的主%s是%s。'&lt;br /&gt;
	else&lt;br /&gt;
		mainForm = '-{主}-%s：%s'&lt;br /&gt;
	end&lt;br /&gt;
	local text = string.format(mainForm, pageType, list)&lt;br /&gt;
	-- Process the options and pass the text to the _rellink function in&lt;br /&gt;
	-- [[Module:Hatnote]].&lt;br /&gt;
	options = options or {}&lt;br /&gt;
	local hnOptions = {&lt;br /&gt;
		selfref = options.selfref&lt;br /&gt;
	}&lt;br /&gt;
	return mHatnote._hatnote(text, hnOptions)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return p&lt;/div&gt;</summary>
		<author><name>黯狐</name></author>
	</entry>
</feed>