Module:Look from

zhwiki>SunAfterRain2026年9月19日 (六) 08:07的版本 (=)
(差异) ←上一版本 | 最后版本 (差异) | 下一版本→ (差异)

此模块的文档可以在Module:Look from/doc创建

local p = {}
local mNS = require('Module:Namespace')

function p._main(args)
	local overrideNS = args['ns']
	local title = args['1']
		and mw.title.new(args['1'], overrideNS)
		or (overrideNS and mw.title.new(mw.title.getCurrentTitle().text, overrideNS) or mw.title.getCurrentTitle())

	local text = args['2'] or '标题以「-{' .. title.prefixedText ..'}-」開頭的所有' .. mNS._namespaceName(nil, title.namespace)

	return '<span class="selfreference">[[Special:PrefixIndex/' .. title.prefixedText .. '|' .. text .. ']]</span>'
end

function p.main(frame)
	local args = frame:getParent().args
	return p._main(args, frame)
end

return p