跳转到内容

模組:Cite

本页使用了标题或全文手工转换
维基百科,自由的百科全书

这是本页的一个历史版本,由Kcx36留言 | 贡献2025年7月19日 (六) 17:57 (// InPageEdit)编辑。这可能和当前版本存在着巨大的差异。

local p = {}
local CS1 = require('Module:Citation/CS1')

setmetatable(p, {
	__index = function(t, k)
		return function(frame)
			local citationClass = mw.ustring.lower(k)

			local newFrame = {
				getParent = function(self)
					return frame
				end,
				getTitle = function(self)
					return 'Module:Citation/CS1'
				end,
				args = {CitationClass=citationClass}
			}

			setmetatable(newFrame, {
				__index = function(t2, k2)
					if type(frame[k2]) == 'function' then
						return function(...)
							return frame[k2](frame, select(2, ...))
						end
					else
						return frame[k2]
					end
				end
			})

			return CS1.citation(newFrame)
		end
	end
})

return p